Number functions
The following table describes the number functions.
Warning Using negation (!) at the beginning of any function can cause unexpected validation results.
Function | Description |
---|---|
isEven (number) | Checks whether the number is even. |
isOdd (number) | Checks whether the number is odd. |
isGreater (number1, number2) | Checks whether the number is greater than the second number. |
isGreaterEq (number1, number2) | Checks whether the number is greater than or equal to the second number. |
isLess (number1, number2) | Checks whether the number is less than the second number. |
isLessEq (number1, number2) | Checks whether the number is less than or equal to the second number. |
isPositive (number) | Checks whether the number is greater than zero. |
isNonnegative (number) | Checks whether the number is greater than or equal to zero. |
isNegative (number) | Checks whether the number is less than zero. |
isBetween (number1, number2, number3) |
Checks whether the number is greater than the second number but less than the third number. |