NumberOptions
Index
Properties
optionalarbitrary
optionalmax
maxInclusive
optionalmin
A number is valid if the value is greater than or equal to the parameter.
Example
Given $integer({minimum: 1.0})
- input: 0 (invalid)
- input: 1 (validates)
minInclusive
optionalmultipleOf
The resulting property will only be valid when the value divided by this parameter results in a strict integer. (exluding zero)
Example
Given $integer({multipleOf: 0.2})
- input: 10 -> 10 / 0.2 = 50 (validates)
- input: 10.5 -> 10.5 / 0.2 = 52.5 (invalid)
A number is valid if the value is lower than or equal to the parameter.
Example
Given
$integer({maximum: 1.0})