react-email-validator
v1.0.2
Published
a very fast and robust email validator
Downloads
2,299
Readme
react-email-validator
A simple module to validate an e-mail address
Installation
Install via NPM:
npm install react-email-validator
Usage
javascript
var validate = require("react-email-validator");
validate("[email protected]"); // true
validate("test.com"); // false
TypeScript
import { validate } from 'email-validator';
validate("[email protected]"); // true
validate("test.com"); // false
You can also get the result from the res
variable.
Usage
var validate = require("react-email-validator");
var res = require("react-email-validator");
validate("[email protected]");
if(res){
// the email is valid
}else {
// the email is invalid
}
TypeScript
import { validate, res } from 'email-validator';
validate("[email protected]"); // true
if(res){
// the email is valid
}else {
// the email is invalid
}