Created
April 30, 2018 00:35
-
-
Save djabif/b6fb50d19992e0838cd63c62470491e4 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
account_validation_messages = { | |
'username': [ | |
{ type: 'required', message: 'Username is required' }, | |
{ type: 'minlength', message: 'Username must be at least 5 characters long' }, | |
{ type: 'maxlength', message: 'Username cannot be more than 25 characters long' }, | |
{ type: 'pattern', message: 'Your username must contain only numbers and letters' }, | |
{ type: 'validUsername', message: 'Your username has already been taken' } | |
], | |
'email': [ | |
{ type: 'required', message: 'Email is required' }, | |
{ type: 'pattern', message: 'Enter a valid email' } | |
], | |
'confirm_password': [ | |
{ type: 'required', message: 'Confirm password is required' }, | |
{ type: 'areEqual', message: 'Password mismatch' } | |
], | |
'password': [ | |
{ type: 'required', message: 'Password is required' }, | |
{ type: 'minlength', message: 'Password must be at least 5 characters long' }, | |
{ type: 'pattern', message: 'Your password must contain at least one uppercase, one lowercase, and one number' } | |
], | |
'terms': [ | |
{ type: 'pattern', message: 'You must accept terms and conditions' } | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment