email-validation
Advanced tools
Comparing version 0.1.1 to 0.1.2
module.exports = require('./lib/email-validation'); |
@@ -57,2 +57,3 @@ var util = require('util'); | ||
} | ||
if(_domain === '') throw util.format("[Error parseing email address: no domain part]", address); | ||
if(hostisip && !require('net').isIP(address.substring(hoststartpos+1,address.length-1))) throw util.format("[Error parsing email address: invalid IP address]"); | ||
@@ -59,0 +60,0 @@ if(hostisip && address[address.length-1] != "]") throw util.format("[Error parsing email address: IP address notation must end with a ']']"); |
{ | ||
"name": "email-validation", | ||
"version": "0.1.1", | ||
"version": "0.1.2", | ||
"description": "Email validation that follows the specs.", | ||
"keywords": [], | ||
"keywords": ["email", "address", "validation", "RFC 5322", "RFC 5321", "RFC 3696"], | ||
"author": "Josh Erickson <josh@snoj.us>", | ||
@@ -7,0 +7,0 @@ "repository": { "type": "git", "url": "git://github.com/snoj/email-validation.git" }, |
@@ -0,0 +0,0 @@ email-validation |
@@ -19,2 +19,6 @@ var email = require('../index'); | ||
parsebad = email.parse("a@"); | ||
assert.equal(parsebad, false); | ||
assert.equal(typeof parsebad['user'], 'undefined'); | ||
assert.equal(typeof parsebad['domain'], 'undefined'); | ||
@@ -35,2 +39,3 @@ //good | ||
assert.equal(email.valid('one.two@-one-two.com'), false); | ||
assert.equal(email.valid('a@'), false); | ||
@@ -37,0 +42,0 @@ //shamelessly copied from http://en.wikipedia.org/wiki/Email_address |
@@ -0,0 +0,0 @@ var email = require('../index'); |
@@ -0,0 +0,0 @@ console.time("25 emails time ten thousand tries"); |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
137
11123
9