1.0.2 • Published 3 years ago

react-email-validator v1.0.2

Weekly downloads
58
License
ISC
Repository
-
Last release
3 years ago

react-email-validator

A simple module to validate an e-mail address

travis build version downloads

Installation

Install via NPM:

npm install react-email-validator

Usage

javascript

var validate = require("react-email-validator");

validate("test@email.com"); // true

validate("test.com"); // false

TypeScript

import { validate } from 'email-validator';

validate("test@email.com"); // 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("test@email.com");
 if(res){
     // the email is valid
 }else {
     // the email is invalid
 }

TypeScript

import { validate, res } from 'email-validator';

validate("test@email.com"); // true
if(res){
     // the email is valid
 }else {
     // the email is invalid
 }