Is there a simple way to modify/customize error messages generated by Symfony validators?
eg. When using a string validator, if the field is empty,
then the message “Required” is displayed by default with the field.
This surely comes from its class, but is there a way to change the message for the String Validator globally so that it applies to all instances?
Thanks in advance.
PS: wouldn’t appreciate a solution that requires changes to the Symfony base code
I suppose there is auto-translation for such messages. Just place the message in your translation file and symfony will render it based on the selected locale