node-deep-email-validator
TypeScript icon, indicating that this package has built-in type declarations

0.0.2 • Public • Published

NodeJS Email Validator

NPM

This is based on deep-email-validator

Validates email addresses based on regex, common typos, disposable email blacklists and DNS records.

  • Validates email looks like an email i.e. contains an "@" and a "." to the right of it using RegEx.
  • Validates common typos e.g. example@gmaill.com using mailcheck.
  • Validates email was not generated by disposable email service using disposable-email-domains.
  • Validates MX records are present on DNS.

Getting Started

Comaptible with nodejs only. Not browser ready.

Install like so

npm i node-deep-email-validator --save

Use like so

const validateEmail = require('node-deep-email-validator');
async function main(){
  const valid = await validate('example@yourdomain.com'); //{ result: Boolean, failReason: String || null }
  if(valid.result){
    //Email is Valid
    //YOUR CODE HERE
  }
}

Readme

Keywords

Package Sidebar

Install

npm i node-deep-email-validator

Weekly Downloads

31

Version

0.0.2

License

ISC

Unpacked Size

16.3 kB

Total Files

27

Last publish

Collaborators

  • umaryusuf11