async-validator
Advanced tools
Comparing version 1.11.1 to 1.11.2
@@ -88,2 +88,3 @@ 'use strict'; | ||
} | ||
function complete(results) { | ||
@@ -170,2 +171,3 @@ var i = void 0; | ||
rule.field = data.field; | ||
function addFullfield(key, schema) { | ||
@@ -236,3 +238,10 @@ return (0, _extends3['default'])({}, schema, { | ||
schema.validate(data.value, data.rule.options || options, function (errs) { | ||
doIt(errs && errs.length ? errors.concat(errs) : errs); | ||
var finalErrors = []; | ||
if (errors && errors.length) { | ||
finalErrors.push.apply(finalErrors, errors); | ||
} | ||
if (errs && errs.length) { | ||
finalErrors.push.apply(finalErrors, errs); | ||
} | ||
doIt(finalErrors.length ? finalErrors : null); | ||
}); | ||
@@ -239,0 +248,0 @@ } |
@@ -86,2 +86,3 @@ 'use strict'; | ||
} | ||
function complete(results) { | ||
@@ -168,2 +169,3 @@ var i = void 0; | ||
rule.field = data.field; | ||
function addFullfield(key, schema) { | ||
@@ -234,3 +236,10 @@ return (0, _extends3['default'])({}, schema, { | ||
schema.validate(data.value, data.rule.options || options, function (errs) { | ||
doIt(errs && errs.length ? errors.concat(errs) : errs); | ||
var finalErrors = []; | ||
if (errors && errors.length) { | ||
finalErrors.push.apply(finalErrors, errors); | ||
} | ||
if (errs && errs.length) { | ||
finalErrors.push.apply(finalErrors, errs); | ||
} | ||
doIt(finalErrors.length ? finalErrors : null); | ||
}); | ||
@@ -237,0 +246,0 @@ } |
{ | ||
"name": "async-validator", | ||
"version": "1.11.1", | ||
"version": "1.11.2", | ||
"description": "validate form asynchronous", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
112908
2613