tv4-formats
Advanced tools
Comparing version 3.0.1 to 3.0.2
@@ -50,3 +50,3 @@ (function () { | ||
exports.url = function (value) { | ||
if (validator.isURL(value)) { | ||
if (validator.isURL(value, { 'require_tld': false })) { | ||
return null; | ||
@@ -53,0 +53,0 @@ } |
{ | ||
"name": "tv4-formats", | ||
"version": "3.0.1", | ||
"version": "3.0.2", | ||
"description": "Common JSON Schema string format constraints in the form of tv4 validator callbacks", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -128,2 +128,6 @@ describe('tv4-formats', function () { | ||
it('validates positively', function () { | ||
assert.strictEqual(formats.url('http://localhost:3000/'), null); | ||
}); | ||
it('validates negatively', function () { | ||
@@ -130,0 +134,0 @@ assert(formats.url('#clearly# :not: a URL').length > 0); |
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
26617
270