Open tomoshim opened 3 years ago
Rule function returns true when the target value "does not" pass. It may causes the confusion.
For example, when required rule receives null, it should return false;
null
false
// present const result = required(null); console.log(result); // true // future const result = required(null); console.log(result); // false
Rule function returns true when the target value "does not" pass. It may causes the confusion.
For example, when required rule receives
null
, it should returnfalse
;