Closed jonathonherbert closed 1 year ago
I think the CategorySelector
in the RuleFormBatchEdit
component also needs to be provided with validationErrors
.
Thanks for spotting! Ooh, batch editing publication validation. I won't address that in this PR (it's not addressed at all IIUC), but it's a good reminder that the validation story for that will need to be different. ab6e7143687b35e6d5560e9c41b54b36de9a058c fixes.
Forgot to mention that CI is still failing - seemingly because RuleManagerSpec.scala isn't formatted properly
Thanks @samanthagottlieb! Good spot, I'd forgotten to push my latest changes.
What does this change?
Adds validation for regex and LTXML rules. It's surfaced under the field. The validation errors themselves can be rather obscure, but I've tried to make it clear that they're related to the syntax of the pattern.
It all happens server-side.
Also links the validator errors for categories.
How to test
Create a rule, and then enter an invalid regex (for example, an unterminated pair of parentheses), or invalid xml (for example, an unterminated tag, or no tag at all!) for regex and languagetool rules respectively. You should get the appropriate error messages