Feature #82366
closedAllow translation of validation messages for a specific elementIdentifier without a formDefinitionIdentifier
100%
Description
As integrator/developer I like to translate form-element validation messages without the need of a form-definition-identifier.
A use case is a installation with multiple forms which share common form fields like the first and the last name. If it's required that the input is not empty, it is necessary to display an error message like "Please fill in the last name".
Currently I can only translate the validation message like:
ContactForm.validation.error.LastName.1221560910
Only available option - very specific.
ContactForm.validation.error.1221560910
validation.error.1221560910
Both are less specific. This is more useful for cases with error messages like "This field is mandatory".
In this use case beside the ContactForm I have another form "StoreContactForm". If I like to have the same error message "Please fill in the last name", I currently add another translation with the key "StoreContactForm.validation.error.LastName.1221560910".
This gets very annoying with each other form with the same field. Especially in installations with multiple translations.
A no-brainer solution would be to add another translation key format within the translation key chain in the translations service for the validation messages.
This would allow to set the needed error message for the last name like "validation.error.LastName.1221560910" for each available form.