-
-
Save amandeepmittal/fa46301e5acdd74a8fa029a53b31c06a to your computer and use it in GitHub Desktop.
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
// model/user.js | |
email: { | |
type: String, | |
trim: true, | |
unique: 'Email already exists', | |
match: [/.+\@.+\..+/, 'Please fill a valid email address'], | |
required: 'Email is required' | |
}, |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment