Symfony2 – Getting translated validation errors in controller

I recently ran into a problem when creating an API call for a project. I needed to validate an entity and, in case of errors, return them to the requester. But having i18n (internationalization and localization) enabled for my project forced me to write theĀ MinLength constraint message as a pluralized message: Password too short, enter at least one character|Password too short, enter at least {{ limit }} characters. Continue reading Symfony2 – Getting translated validation errors in controller