i have problems overriding the form validation.
I have overridden the user class and the RegisterFormType class. In the RegisterFormType class i used the setDefaultOptions function to use an other validation group
public function setDefaultOptions(OptionsResolverInterface $resolver) {
$resolver->setDefaults(array(
'data_class' => 'Clickstorm\Geruest\UserBundle\Entity\User',
'intention' => 'register',
'validation_groups' => array('register')
));
}
But when i submit the form the default validation is executed. But what confuses me the most is that when i tried to override the validation by create an own validation.xml file the validation was triggered twice (the error messages where schon twice).
Any idea about that?
I don’t know if this is the right solution. But it works when overriding the validation_groups in the config file.