Given I am an administrator I would like to have meaningful errors that point to the form field that caused a validation error.
Current status
Currently the validation error message content is: "communityconfiguration-schema-validation-error": "DRAFT: $2. Key: $1". A made up example of this is: DRAFT: String value found, but a number is required. Key: section_image_recommendation.maxTasksPerDay. We cannot do much about the english string returned by the validation library justinrainbow (argument $2) until we tackle T351879. But we can improve the Key: <JsonPointer> part (argument $1).
Proposed design
Follow Codex form guidelines for validation.
- Instead of below the form, on the top. When we tackle T364500 we can move it to the fixed footer.
- Instead of "Name is required" we can display DRAFT: String value found, but a number is required. in English and as a draft.
Acceptance criteria
- For validation errors, change the headline of the error which currently displays Something went wrong while saving your changes. Please try again later. to There are $1 errors in this form where $1 is the number of errors
- Display validation error field names in the body of the error message
- Highlight the relevant field to the error (If it is a nested field it would be ok to higlight its parent as an initial version)
- Nice to have: Display validation error field names in the body of the error message as anchors to the relevant field
Open question
- Should we remove the If the problem persists, consider filling an issue in the bug reporting tool. footer line if the error is a validation error?


