cv-email
v0.2.0
Published
The Official Email Validator Based on RFC 5322 Standard
Downloads
4
Maintainers
Readme
Email Validator Plugin for Composed Validations Library
This is the Official Email Validator Plugin for the Composed Validations Library. The regex used in this plugin is based on the most pratical RFC 5322 standard. You can read more about the standard and the regex itself in: http://www.regular-expressions.info/email.html.
Installation
npm install cv-email
How to Use
var validations = require('composed-validations');
var emailValidator = require('cv-email')(validations);
emailValidator.test("[email protected]"); // will return [email protected]
emailValidator.test("wrong email"); // false (will throw an error with the error message: is not a valid email)
Contributing
- Fork it!
- Create your feature branch:
git checkout -b my-new-feature
- Commit your changes:
git commit -m 'Add some feature'
- Push to the branch:
git push origin my-new-feature
- Submit a pull request :D