Don't skip subsequent validators when an earlier validator changed the value from null to non-null

This commit is contained in:
Sven Slootweg 2020-09-08 18:38:22 +02:00
parent ba400dd4ec
commit 2941aef6c8

View file

@ -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,