Issue Task Under Review

#111698Compare validation error codes as strings in the form editor

Alexander Schnitzler 12/01/26, 18:21 updated 12/01/26, 18:44

Description

The form editor compares validation error codes numerically. inspector-component.ts (two places in the editor for validation error messages) and view-model.ts run the code of a configured message through parseInt() before comparing it with the codes of a validator.

This works as long as every code is an integer. A code that is not a number, like the UUID codes of Symfony constraints, never matches: the editor does not find the existing message and appends a new entry on every keystroke.

Goal

Compare the codes as strings. Nothing changes for the integer codes used today, and the editor is prepared for validators that report other codes (see #111686).

Notes

  • Sources are in Build/Sources/TypeScript/form/backend/form-editor/, the built JavaScript has to be updated with the same patch.
  • Check in the form editor: set, change and remove a custom error message of a validator, then save and reopen the form.

Part of #111686.

Reviews 1

History 01

  1. Gerrit Code Review pushed patch set 1 for main to change 98267 status New Under Review 12/01/26, 18:44