I'm searching for informations if there is some kind of flag/option that force symfony2 validation stop on first error in validation chain. For example I have three validators on my email
field:
email:
- NotBlank: { groups: [ send_activation_email ] }
- Length: { min: 6, max: 80, charset: UTF-8, groups: [ send_activation_email ] }
- Email: { groups: [ send_activation_email ] }
I want to stop validation after first error. How can I achieve that? I read similar questions:
Symfony2 : Validation Halt on First Error
How to stop validation on constraint failure in Symfony2
Symfony-2 gives more than one validation error message
Last one is quite good but is there any way to do this without using validation groups every time, when there are more than one validator? I read somewhere that in Symfony 2.2 there will be a flag or option for this, but I have 2.2.1 version and can't find such option.