Simple email validator
Below are the sample supported formats.
Valid: [email protected] [email protected] [email protected]
Invalid: [email protected] basha:[email protected] basha+gmail.com [email protected]
$ npm install --save validateemail
const validator= require('validateemail');
validator.validate("addressToValidate");
validator.validate("[email protected]"); // true
validator.validate("[email protected]"); // false
validator.validateAsync("[email protected]", function(isValid) {
Logic based on isValid
});Returns a boolean.
Type: string
Email address to validate.
Calls the callback method, with the boolean result.
Contributions to validateemail are most welcome, check the LICENSE file for more info.
Distributed under the MIT license. See LICENSE for more information.
bashasm
whyjsnow.com