Test a number to be infinite.
Test a number to be in a valid range for a 16-bit signed integer.
Test a number to be in a valid range for a 32-bit signed integer.
Test a number to be in a valid range for a 8-bit signed integer.
Test a number to be an integer.
Test a number to be an integer or infinite.
Test a number to be negative.
Invert the following validators.
Test a number to be positive.
Test a number to be in a valid range for a 16-bit unsigned integer.
Test a number to be in a valid range for a 32-bit unsigned integer.
Test a number to be in a valid range for a 8-bit unsigned integer.
Register a new validator.
Validator to register.
Test a number to be equal to a specified number.
Expected value to match.
Test a number to be greater than the provided value.
Minimum value.
Test a number to be greater than or equal to the provided value.
Minimum value.
Test a number to be in a specified range.
Start of the range.
End of the range.
Test if the value matches a custom validation function. The validation function should return true
if the value passes the function. If the function either returns false
or a string, the function fails and the string will be used as error message.
Validation function.
Test a number to be less than the provided value.
Maximum value.
Test a number to be less than or equal to the provided value.
Minimum value.
Provide a new error message to be thrown when the validation fails.
Either a string containing the new message or a function returning the new message.
Test if a number is an element of the provided list.
List of possible values.
Test if the value matches a custom validation function. The validation function should return an object containing a validator
and message
. If the validator
is false
, the validation fails and the message
will be used as error message. If the message
is a function, the function is invoked with the label
as argument to let you further customize the error message.
Custom validation function.
Test a number to be finite.