Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

valid-email

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

valid-email

Test the validity of an email address

  • 1.0.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

valid-email

Validate Email Addresses w/o pure regular expressions.

Regular expression validation is often useful, but also often inaccurate. Sometimes it's just better to do it manually.

Example

    console.log(require('valid-email')('john@iamjohnhenry.com'))//#true
    console.log(require('valid-email')('iamjohnhenry.com'))//#false

Accuracy

There are some cases in which this library present the user with false negatives (See this issue.

This library is considered a "good enough" implementation for most use cases and is meant to provide a simple method of validating email about which most coders can reason.

There are other methods which may be more accurate but more difficult ensure that it's doing what it's doing. (See https://emailregex.com/).

Please be aware of the levels of accuracy your application needs.

Warning

This code is compiled from untested code found on stackoverflow and is mainly intended for academic purposes. Use at your own risk.

Much thanks to @davisjam for helping me to patch a recent security vunerability https://github.com/johnhenry/valid-email/issues/4 .

Keywords

FAQs

Package last updated on 08 Oct 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc