Mixstore\UserBundle\Entity\User: properties: # Your custom fields in your user entity... name: - NotBlank: message: mixstore_user.name.blank groups: [ "MixstoreProfile" ] - Length: min: 2 minMessage: mixstore_user.name.short max: 255 maxMessage: mixstore_user.name.long groups: [ "MixstoreProfile" ] surname: - NotBlank: message: mixstore_user.surname.blank groups: [ "MixstoreProfile" ] - Length: min: 2 minMessage: mixstore_user.surname.short max: 255 maxMessage: mixstore_user.surname.long groups: [ "MixstoreProfile" ] # Note: We still want to validate the email # See FOSUserBundle/Resources/config/validation/orm.xml to understand # the UniqueEntity constraint that was originally applied to both # username and email fields # # As you can see, we are only applying the UniqueEntity constraint to # the email field and not the username field. FOS\UserBundle\Model\User: constraints: - Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity: fields: email errorPath: email message: fos_user.email.already_used groups: [ "MixstoreRegistration", "MixstoreProfile" ] properties: email: - NotBlank: message: fos_user.email.blank groups: [ "MixstoreRegistration", "MixstoreProfile" ] - Length: min: 2 minMessage: fos_user.email.short max: 255 maxMessage: fos_user.email.long groups: [ "MixstoreRegistration", "ResetPassword" ] - Email: message: fos_user.email.invalid groups: [ "MixstoreRegistration", "MixstoreProfile" ] plainPassword: - NotBlank: message: fos_user.password.blank groups: [ "MixstoreRegistration", "ResetPassword", "ChangePassword" ] - Length: min: 2 minMessage: fos_user.password.blank groups: [ "MixstoreRegistration", "MixstoreProfile", "ResetPassword", "ChangePassword"] FOS\UserBundle\Model\Group: properties: name: - NotBlank: message: fos_user.group.blank groups: [ "MixstoreRegistration" ] - Length: min: 2 minMessage: fos_user.group.short max: 255 maxMessage: fos_user.group.long groups: [ "MixstoreRegistration" ]