I only want to have email as mode of login, I don't want to have username. Is it possible with symfony2/symfony3 and FOSUserbundle?
I read here http://groups.google.com/group/symfony2/browse_thread/thread/92ac92eb18b423fe
But then I am stuck with two constraint violations.
Problem is if the user leaves the email address blank, I get two constraint violations:
- Please enter a username
- Please enter an email
Is there a way to disable validation for a given field, or a better way to remove a field from the form altogether?
Have you tried customizing the validation?
To do this, you need to have your own bundle inheriting from the UserBundle, and then copy/adjust Resources/config/validation.xml. Plus, you need to set the validation_groups in the config.yml to your custom validation.