I am using Symfony 2.3.
I have created simple order form using $this->createFormBuilder
in my controller. I am validating one Doctrine field with:
/**
* @Assert\Length(min=3)
*/
protected $name;
However, upon validation fail, I get a duplicated error message near the field:
This value is too short. It should have 3 character or more.|This value is too short. It should have 3 characters or more.
My template for this element is as simple as:
{{ form_errors(form.name) }}
{{ form_label(form.name) }}
{{ form_widget(form.name) }}
Everything else seems to bet working as expected, except for that validation error message being duplicated. As if pluralization would not be working. Anyone has a suggestion on why this would be failing?
EDIT
It seems that SonataAdminBundle is overriding form_errors
block. How to remove that override from non-sonata controller?