Browse Source

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

master
Sven Slootweg 1 year ago
parent
commit
2941aef6c8
  1. 2
      src/compose-rules.js

2
src/compose-rules.js

@ -81,7 +81,7 @@ module.exports.compose = function composeValidators(validators) {
let errors = [];
for (let rule of nonMarkerRules) {
if (value != null || rule.callIfNull === true) {
if (lastValue != null || rule.callIfNull === true) {
let result = callRule({
rule: rule,
value: lastValue,

Loading…
Cancel
Save