Open
Description
Is your feature request related to a problem? Please describe.
When validating numbers, the current implementations of isMinNumber
and isMaxNumber
do not support strict inequality, meaning that the limit will always be a valid value.
Describe the solution you'd like
I'd like to have the possibility to declare a strict minimum or maximum value for which the equality will result in an invalid field.
Describe alternatives you've considered
I see two ways of handling this:
- add a parameter to the current
isMinNumber
&isMaxNumber
. I can see a call to the validation be something likeisMinNumber(0, {strict: true})
with the strict mode being set to false by default. - add a different validation that will handle this case. It would basically use the same code as the current versions but with a strict inequality instead.