async-validator
Advanced tools
Comparing version 1.6.7 to 1.6.8
@@ -25,3 +25,3 @@ 'use strict'; | ||
function required(rule, value, source, errors, options, type) { | ||
if (rule.required && (!source.hasOwnProperty(rule.field) || util.isEmptyValue(value, type))) { | ||
if (rule.required && (!source.hasOwnProperty(rule.field) || util.isEmptyValue(value, type || rule.type))) { | ||
errors.push(util.format(options.messages.required, rule.fullField)); | ||
@@ -28,0 +28,0 @@ } |
@@ -83,3 +83,3 @@ 'use strict'; | ||
function isNativeStringType(type) { | ||
return type === 'string' || type === 'url' || type === 'hex' || type === 'email'; | ||
return type === 'string' || type === 'url' || type === 'hex' || type === 'email' || type === 'pattern'; | ||
} | ||
@@ -86,0 +86,0 @@ |
{ | ||
"name": "async-validator", | ||
"version": "1.6.7", | ||
"version": "1.6.8", | ||
"description": "validate form asynchronous", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
@@ -330,3 +330,3 @@ # async-validator | ||
}).then(function(data){ | ||
callback(null); | ||
callback(); | ||
},function(error){ | ||
@@ -357,2 +357,2 @@ callback(new Error(error)) | ||
Everything is [MIT](http://en.wikipedia.org/wiki/MIT_License). | ||
Everything is [MIT](http://en.wikipedia.org/wiki/MIT_License). |
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
No License Found
License(Experimental) License information could not be found.
Found 1 instance in 1 package
58517
29
0
357