async-validator
Advanced tools
Comparing version 1.8.4 to 1.8.5
@@ -15,6 +15,14 @@ import rules from '../rule/'; | ||
if (!isEmptyValue(value)) { | ||
rules.type(rule, value, source, errors, options); | ||
if (value) { | ||
rules.range(rule, value.getTime(), source, errors, options); | ||
var dateObject = void 0; | ||
if (typeof value === 'number') { | ||
dateObject = new Date(value); | ||
} else { | ||
dateObject = value; | ||
} | ||
rules.type(rule, dateObject, source, errors, options); | ||
if (dateObject) { | ||
rules.range(rule, dateObject.getTime(), source, errors, options); | ||
} | ||
} | ||
@@ -21,0 +29,0 @@ } |
@@ -26,6 +26,14 @@ 'use strict'; | ||
if (!(0, _util.isEmptyValue)(value)) { | ||
_rule2['default'].type(rule, value, source, errors, options); | ||
if (value) { | ||
_rule2['default'].range(rule, value.getTime(), source, errors, options); | ||
var dateObject = void 0; | ||
if (typeof value === 'number') { | ||
dateObject = new Date(value); | ||
} else { | ||
dateObject = value; | ||
} | ||
_rule2['default'].type(rule, dateObject, source, errors, options); | ||
if (dateObject) { | ||
_rule2['default'].range(rule, dateObject.getTime(), source, errors, options); | ||
} | ||
} | ||
@@ -32,0 +40,0 @@ } |
{ | ||
"name": "async-validator", | ||
"version": "1.8.4", | ||
"version": "1.8.5", | ||
"description": "validate form asynchronous", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
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
97522
2374