You can install with npm:
npm install fixemail
You can install with yarn:
yarn add fixemail
You can fix error in email syntax by user.
You can use:
const fixEmail = require('fixemail');
fixEmail('[email protected]')
// > { email: '[email protected]', valid: true }
fixEmail('emai l@gmail .com')
// > { email: '[email protected]', valid: true }
fixEmail('emai lgmail .com')
// > { email: 'emailgmail.com', valid: false }
import fixEmail from 'fixemail';
fixEmail('[email protected]')
// > { email: '[email protected]', valid: true }
fixEmail('emai l@gmail .com')
// > { email: '[email protected]', valid: true }
fixEmail('emai lgmail .com')
// > { email: 'emailgmail.com', valid: false }
You can validate your email with this package.
Used package email-validator
You can use:
const { validate } = require('fixemail');
validate('[email protected]')
// > true
validate('emai l@gmail .com')
// > false
import { validate } from 'fixemail';
validate('[email protected]')
// > true
validate('emai l@gmail .com')
// > false
- Remove alias email, after +
- Remove accents
- Verify is domain is valid
- Remove temp emails