Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[8.17] [Search][a11y] Add validation to extraction rules form (#202980)…
… (#205192) # Backport This will backport the following commits from `main` to `8.17`: - [[Search][a11y] Add validation to extraction rules form (#202980)](#202980) <!--- Backport version: 9.4.3 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Navarone Feekery","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-12-27T11:22:19Z","message":"[Search][a11y] Add validation to extraction rules form (#202980)\n\n## Closes: https://github.com/elastic/kibana/issues/199154\r\n\r\nThis adds more validations to the Crawler extraction rules form.\r\n\r\nThe original issue of the error being at the top of the page is not\r\neasily fixable, as it's a catch-all server error display. Ideally, we\r\nshouldn't have server errors occurring at all, so it makes sense to me\r\nto just add a front-end validation to the inputs in this field.\r\n\r\nThese validations cover the following previously-missed scenarios:\r\n\r\n1. When a user has not added any rules\r\n2. When rule is for a specific URL and the URL pattern field is empty,\r\nor doesn't begin with `/`\r\n3. When the value for \"Source\" is empty (covers both HTML element and\r\nURL selectors)\r\n4. When \"Content\" is \"A fixed value\" and the value field is empty","sha":"9865da3844674e560e9f87c07ce65ad025afb12f","branchLabelMapping":{"^v9.0.0$":"main","^v8.18.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","v9.0.0","Team:Search","backport:prev-major"],"title":"[Search][a11y] Add validation to extraction rules form","number":202980,"url":"https://github.com/elastic/kibana/pull/202980","mergeCommit":{"message":"[Search][a11y] Add validation to extraction rules form (#202980)\n\n## Closes: https://github.com/elastic/kibana/issues/199154\r\n\r\nThis adds more validations to the Crawler extraction rules form.\r\n\r\nThe original issue of the error being at the top of the page is not\r\neasily fixable, as it's a catch-all server error display. Ideally, we\r\nshouldn't have server errors occurring at all, so it makes sense to me\r\nto just add a front-end validation to the inputs in this field.\r\n\r\nThese validations cover the following previously-missed scenarios:\r\n\r\n1. When a user has not added any rules\r\n2. When rule is for a specific URL and the URL pattern field is empty,\r\nor doesn't begin with `/`\r\n3. When the value for \"Source\" is empty (covers both HTML element and\r\nURL selectors)\r\n4. When \"Content\" is \"A fixed value\" and the value field is empty","sha":"9865da3844674e560e9f87c07ce65ad025afb12f"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/202980","number":202980,"mergeCommit":{"message":"[Search][a11y] Add validation to extraction rules form (#202980)\n\n## Closes: https://github.com/elastic/kibana/issues/199154\r\n\r\nThis adds more validations to the Crawler extraction rules form.\r\n\r\nThe original issue of the error being at the top of the page is not\r\neasily fixable, as it's a catch-all server error display. Ideally, we\r\nshouldn't have server errors occurring at all, so it makes sense to me\r\nto just add a front-end validation to the inputs in this field.\r\n\r\nThese validations cover the following previously-missed scenarios:\r\n\r\n1. When a user has not added any rules\r\n2. When rule is for a specific URL and the URL pattern field is empty,\r\nor doesn't begin with `/`\r\n3. When the value for \"Source\" is empty (covers both HTML element and\r\nURL selectors)\r\n4. When \"Content\" is \"A fixed value\" and the value field is empty","sha":"9865da3844674e560e9f87c07ce65ad025afb12f"}}]}] BACKPORT--> Co-authored-by: Navarone Feekery <[email protected]>
- Loading branch information