Symfony2: How to translate custom error messages in form types?
Validation translations go to the validators.LANG.yml
files — not messages.LANG.yml
ones.
The replacements are not set in the validation.yml file but by the Validator.
validators.en.yml
noFirstnameMinLimit: Please provide at least {{ limit }} characters
validation.yml
Acm\AddressBundle\Entity\Address: properties: firstname: - Length: min: 3 minMessage: "noFirstnameMinLimit"
This works for me with Symfony 2.4