umaryusuf11 / node-deep-email-validator

Validates emails based on regex, common typos, disposable email blacklists, DNS records and SMTP server response. Based on deep-email-validator.
1 stars 0 forks source link

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.

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