WireframesJPN / simple-valid

0 stars 3 forks source link

Turn over the returning test results #15

Open tomoshim opened 3 years ago

tomoshim commented 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;

// present
const result = required(null);
console.log(result); // true

// future
const result = required(null);
console.log(result); // false