Skip to content

Nandan4java/validate-email

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

validate-email

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]

Install

$ npm install --save validateemail

Usage

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
});

API

validate(addressToValidate)

Returns a boolean.

addressToValidate

Type: string

Email address to validate.

validate(addressToValidate, callback)

Calls the callback method, with the boolean result.

Contribute

Contributions to validateemail are most welcome, check the LICENSE file for more info.

License

Distributed under the MIT license. See LICENSE for more information. bashasm whyjsnow.com

About

Simple email validator

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • JavaScript 100.0%