Skip to content

Instantly share code, notes, and snippets.

@pavsidhu
Last active January 2, 2018 22:30
Show Gist options
  • Save pavsidhu/46ccaa1a1f0fc1c2e8849f3902e5f461 to your computer and use it in GitHub Desktop.
Save pavsidhu/46ccaa1a1f0fc1c2e8849f3902e5f461 to your computer and use it in GitHub Desktop.
Validate.js constraints
const validation = {
email: {
presence: {
message: '^Please enter an email address'
},
email: {
message: '^Please enter a valid email address'
}
},
password: {
presence: {
message: '^Please enter a password'
},
length: {
minimum: 5,
message: '^Your password must be at least 5 characters'
}
}
}
export default validation
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment