Last active
August 29, 2015 14:04
-
-
Save tobalsan/1448a398f496ae5cc32d to your computer and use it in GitHub Desktop.
Symfony2: customize constraints for validation groups
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
constraints: | |
- Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity: { fields: username, groups: [create_user, default], message: userExists } | |
- FOS\UserBundle\Validator\Unique: { property: usernameCanonical, groups: [create_user, default], message: userExists } | |
- Callback: | |
methods: [isTimeZoneValid] | |
groups: [create_user, default] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment