Created
June 19, 2019 12:22
-
-
Save bettdouglas/348a4187d8c010363c5e6b8eced6d256 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
_validator.ruleFor('email', ()=>text) | |
..notEmpty() // enforces that the email should not be empty | |
..withMessage('Email cannot be empty') //return message if the email is empty | |
..emailAddress() //checks if the email is a valid email address -- validation | |
..withMessage('Enter a valid email'); //return message if email is empty |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment