When using GridFieldEditableColumns, if there are validation errors when saving the record the gridfield is on, the validation error messages are displayed against the parent record.
If the parent record has fields with the same name as the record being edited inline, this results in the message displaying against that field on the parent record (e.g. if there is a Title field on the parent record, and validation fails on the Title field of the child record, it looks like the parent record's Title field failed validation).
If the parent record doesn't have the same-named field, the validation message appears at the top of the form, and doesn't indicate what record or field it is for.
This is made worse in CMS 6 due to the increased validation rules (e.g. entering too much text results in a validation error when it didn't used to).
Reproduction steps
This is easiest to reproduce in CMS 6 with userforms:
- Create a user defined form page
- Go to the fields tab
- Enter > 255 characters into any field
- Save
PRs
When using
GridFieldEditableColumns, if there are validation errors when saving the record the gridfield is on, the validation error messages are displayed against the parent record.If the parent record has fields with the same name as the record being edited inline, this results in the message displaying against that field on the parent record (e.g. if there is a
Titlefield on the parent record, and validation fails on theTitlefield of the child record, it looks like the parent record'sTitlefield failed validation).If the parent record doesn't have the same-named field, the validation message appears at the top of the form, and doesn't indicate what record or field it is for.
This is made worse in CMS 6 due to the increased validation rules (e.g. entering too much text results in a validation error when it didn't used to).
Reproduction steps
This is easiest to reproduce in CMS 6 with userforms:
PRs