Skip to content

GridFieldEditableColumns doesn't display validation messages in context #430

@GuySartorelli

Description

@GuySartorelli

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:

  1. Create a user defined form page
  2. Go to the fields tab
  3. Enter > 255 characters into any field
  4. Save

PRs

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions