@webb/validate-email
TypeScript icon, indicating that this package has built-in type declarations

2020.4.16 • Public • Published

@webb/validate-email

Pretty good email validation

Install

$ npm i @webb/validate-email

Usage

import validateEmail from "@webb/validate-email";

// You would obviously have this wrapped in an async function
// This example is extremely pared down

if (!validateEmail("l0l you gez h@x0r3d!")) {
  return "Email validation failed";
}
// You can also import the raw regex this module is using...
// But like, why?
import { emailRegex } from "@webb/validate-email";

if (!emailRegex.test("you@example.com")) {
  return "Email validation failed";
}

API

validateEmail(suppliedEmail)

suppliedEmail

Type: string

Pass any input into this function and you will find out if it is valid or not.

emailRegex

You better know what you are doing.

Readme

Keywords

none

Package Sidebar

Install

npm i @webb/validate-email

Weekly Downloads

2

Version

2020.4.16

License

MIT

Unpacked Size

4.12 kB

Total Files

6

Last publish

Collaborators

  • netoperatorwibby