Simple email validator
Below are the sample supported formats.
Valid: basha502@gmail.com basha.shaik@gmail.com basha123@gmail.com
Invalid: basha..shaik@gmail.com basha:shaik@gmail.com basha+gmail.com basha.basha@basha.com.com
$ npm install --save validateemail
const validator= require('validateemail');
validator.validate("addressToValidate");
validator.validate("basha502@gmail.com"); // true
validator.validate("basha..@gmail.com"); // false
validator.validateAsync("basha502@gmail.com", 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