Skip to content
This repository has been archived by the owner on Jul 12, 2022. It is now read-only.

Latest commit

 

History

History
26 lines (18 loc) · 611 Bytes

README.md

File metadata and controls

26 lines (18 loc) · 611 Bytes

isMailFine

A simple (but correct) library for validating email addresses. Supports mail addresses as defined in rfc5322 as well as the new Internationalized Mail Address standards (rfc653x). Based on https://github.com/jstedfast/EmailValidation

npm i @3cx/is-mail-fine

Usage

API

import { isMailFine } from 'is-mail-fine';

// global
isMailFine(
	email, // the email address to check
	allowInternational // true/false, will allow international addresses (e.g cyrillic or chinese),
	allowTopLevelDomains // true/false, will allow top level domains
);