I am trying to use Sonata User Bundle and extend the user entity to add some extra relations. I created my own ApplicationSonataUserBundle child bundle as documented here: http://sonata-project.org/bundles/user/master/doc/reference/installation.html Everything works fine except for form validation. I have looked at: http://symfony.com/doc/current/cookbook/bundles/override.html#override-validation
If I understand it correctly I need to do this only if I want to override some constraints. But I would like my entity to inherit all the constraints that are set in FOS User Bundle (which is extended by Sonata User Bundle, which is extended by my own ApplicationSonataUserBundle )
Still when I print my registration form the constraints seem to be ignored.... no unique check on emailCanonical etc, password lengths or anything.
My solution is to create a whole new validation.xml for my extended entity and place it in my ApplicationSonataUserBundle. Is this correct or is there any other way i can inherit the constraints from the extended Application\Sonata\UserBundle\Entity\User that supposedly inherits the constraints from FOS\UserBundle\Model\User ?
TIA.