I am using FOSUserBundle. In my project, I created my own UserBundle and overrode the controller, the forms and the handlers. Now when a user tries to register with an existing email, the site crashes (email is unique for doctrine). It seems like there is no validation made. I thought there would be some validation as I have in my validation.yml:
YOP\UserBundle\Entity\User:
constraints:
- Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity: email
properties:
email:
- Email: ~
How come the validation isn't made on the email field? How can I make sure that my validation constraints are taken into account?
PS: the validation.yml file is not in my UserBundle, is that a problem?
EDIT:
the code of my UserBundle is available here I don't understand why there is no validation done anymore...
Solved the issue by:
validation.yml:
validation.yml
should be in your user bundle./app/config/config.yml
should be updated as follow: