Comparing version 0.1.6 to 0.1.7
@@ -42,3 +42,3 @@ /// <reference path="../node.d.ts" /> | ||
if (typeof message === "undefined") { message = 'not-valid-email'; } | ||
return exports.match("^[a-z0-9\\._%\\+\\-]+@[a-z0-9\\.\\-]+\\.[a-z]{2,6}$", "i", message); | ||
return exports.match("^[a-z0-9\\._%\\+\\-]+@[a-z0-9\\.\\-]+\\.[a-z]{2,63}$", "i", message); | ||
} | ||
@@ -45,0 +45,0 @@ exports.email = email; |
@@ -13,3 +13,3 @@ { | ||
], | ||
"version" : "0.1.6", | ||
"version" : "0.1.7", | ||
"license" : "MIT", | ||
@@ -16,0 +16,0 @@ "repository" : "http://github.com/dresende/node-enforce.git", |
@@ -113,2 +113,10 @@ var should = require("should"); | ||
it("should pass 'long.tld.upto.63.char@example.abcdefghabcdefghabcdefghabcdefghabcdefghabcdefghabcdefghabcdefg'", function (done) { | ||
validator.validate('long.tld.upto.63.char@example.abcdefghabcdefghabcdefghabcdefghabcdefghabcdefghabcdefghabcdefg', common.checkValidation(done)); | ||
}); | ||
it("should not pass 'long.tld.over.63.char@example.abcdefghabcdefghabcdefghabcdefghabcdefghabcdefghabcdefghabcdefgh'", function (done) { | ||
validator.validate('long.tld.over.63.char@example.abcdefghabcdefghabcdefghabcdefghabcdefghabcdefghabcdefghabcdefgh', common.checkValidation(done, 'not-valid-email')); | ||
}); | ||
it("should not pass 'Abc.example.com'", function (done) { | ||
@@ -115,0 +123,0 @@ validator.validate('Abc.example.com', common.checkValidation(done, 'not-valid-email')); |
Sorry, the diff of this file is not supported yet
136508
3071