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("test@email.com");
validate("test.com");
TypeScript
import { validate } from 'email-validator';
validate("test@email.com");
validate("test.com");
You can also get the result from the res
variable.
Usage
var validate = require("react-email-validator");
var res = require("react-email-validator");
validate("test@email.com");
if(res){
}else {
}
TypeScript
import { validate, res } from 'email-validator';
validate("test@email.com");
if(res){
}else {
}