Validate an email address in Node or RequireJS/AMD. Provide validation that an email address conforms to RFC822.
JavaScript
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
.gitignore
LICENSE.md
README.md
component.json
index.js
package.json

README.md

rfc822-validate

This module provides a JavaScript function to check that an email address is valid and conforms to RFC822. Compatible with Node.js and RequireJS/AMD.

Portions copyright © 2013 William Riley-Land - http://kun.io

Portions copyright © 2006 Ross Kendall - http://rosskendall.com

Portions copyright © 1993-2005 Cal Henderson - http://iamcal.com

Based on the PHP code by Cal Henderson

http://iamcal.com/publish/articles/php/parsing_email/

Licenced under Creative Commons or GPL according to the terms in the LICENSE.md file.

--

Installation

npm install rfc822-validate

and/or

bower install rfc822-validate

Usage

var validateEmail = require('rfc822-validate');
var s = 'test@example.com';
var valid = validateEmail(s);

if (valid) console.log('s was a valid email address');
else console.log('s was not a valid email address');