Created
January 9, 2013 19:52
-
-
Save guilespi/4496250 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| (ns notify-blaster.models.validation.user) | |
| (def rules | |
| { :username {:validations | |
| {:required true | |
| :unique true | |
| :max-length 50} | |
| :messages | |
| {:required "User name is required" | |
| :unique "User name %s is already in use, please choose another one" | |
| :max-length "Office name must be shorter than 50 characters"}} | |
| :email {:validations | |
| {:max-length 255 | |
| :required true | |
| :email true}} | |
| :display_name {:validations | |
| {:max-length 255}} | |
| :password {:validations | |
| {:required true | |
| :min-length 5 | |
| :max-length 255}} | |
| :password-match {:validations | |
| {:required true | |
| :matches :password}} | |
| :roles {:validations | |
| {:required true}}}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment