emsifa / validasaur

Deno validation library
MIT License
45 stars 9 forks source link

Add `notNaN()` rule #37

Open Tandashi opened 2 years ago

Tandashi commented 2 years ago

A nonNaN rule has been added since the existing rules like isNumber, isFloat, isNumeric, minNumber, maxNumber all pass when providing a NaN value.

To provide backwards compatibility, the existing rules have not been changed.

Furthermore, the README has been changed to provide a notice that the above rules don't check for NaN.

Would fix issues like https://github.com/emsifa/validasaur/issues/33