Don't skip subsequent validators when an earlier validator changed the value from null to non-null
This commit is contained in:
parent
ba400dd4ec
commit
2941aef6c8
|
@ -81,7 +81,7 @@ module.exports.compose = function composeValidators(validators) {
|
||||||
let errors = [];
|
let errors = [];
|
||||||
|
|
||||||
for (let rule of nonMarkerRules) {
|
for (let rule of nonMarkerRules) {
|
||||||
if (value != null || rule.callIfNull === true) {
|
if (lastValue != null || rule.callIfNull === true) {
|
||||||
let result = callRule({
|
let result = callRule({
|
||||||
rule: rule,
|
rule: rule,
|
||||||
value: lastValue,
|
value: lastValue,
|
||||||
|
|
Loading…
Reference in a new issue