You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When checking their type, NaN and any number will return true as they are all numbers. And NaN is neither superior nor inferior to any number---since it has no value... So it will never return the validationError...
I'll file a PR for that, and I'll add a check to the tests suite.
The text was updated successfully, but these errors were encountered:
Hi!
I'm pretty sure this was not meant to be as it wasn't tested as an accepted value:
NaN
is validated astrue
, whatever happens.The issue is pretty simple when reading the code: https://github.com/offirgolan/ember-validators/blob/1568f472eb5d9851222b9944521ff1ba529641dd/addon/inclusion.js#L42
When checking their type,
NaN
and anynumber
will return true as they are allnumber
s. AndNaN
is neither superior nor inferior to anynumber
---since it has no value... So it will never return the validationError...I'll file a PR for that, and I'll add a check to the tests suite.
The text was updated successfully, but these errors were encountered: