calidation
Advanced tools
Comparing version 1.8.0 to 1.9.0
@@ -161,3 +161,3 @@ 'use strict'; | ||
return validator(validatorConfig)(allFields[name]); | ||
return validator(validatorConfig, context)(allFields[name]); | ||
}, null); | ||
@@ -164,0 +164,0 @@ }, _this.registerSubComponent = function (subComponentConfig, initialValues) { |
{ | ||
"name": "calidation", | ||
"version": "1.8.0", | ||
"version": "1.9.0", | ||
"description": "A red hot validation library for React", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
@@ -364,5 +364,6 @@ # calidation | ||
const extraValidators = { | ||
isEven: config => value => | ||
isEven: (config, { fields, errors }) => value => | ||
Number(value) % 2 !== 0 ? config.message : null, | ||
isOdd: config => value => (Number(value) % 2 !== 1 ? config.message : null), | ||
isOdd: (config, { fields, errors }) => value => | ||
Number(value) % 2 !== 1 ? config.message : null, | ||
}; | ||
@@ -369,0 +370,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
41733
517