Prevent not-equals from failing on fields that are both empty
This commit is contained in:
parent
48059f6096
commit
a3629ce68c
|
@ -248,7 +248,11 @@ const equalHandler = (value, rule) => {
|
|||
|
||||
// Evaluates a not equal constraint
|
||||
const notEqualHandler = (value, rule) => {
|
||||
return !equalHandler(value, rule)
|
||||
const ruleValue = parseType(rule.value, rule.type)
|
||||
if (value == null && ruleValue == null) {
|
||||
return true
|
||||
}
|
||||
return value !== ruleValue
|
||||
}
|
||||
|
||||
// Evaluates a regex constraint
|
||||
|
|
Loading…
Reference in New Issue