Show More
Commit Commit message Age Author Refs
r3:553cd029927a
Upgraded deps
0
r2:2502e9921c6c
Updated deps and removed private registry
0
r1:0b60fa0c3f66
Plural
0
r0:6a6a6bb4bacc
Initial commit
0
< 1 >

@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.