maximum
Validates that the double value is less than or equal to limit.
Usage:
rules<Double> {
maximum(20.0) { "must be less than or equal to 20.0" }
}
Content copied to clipboard
Parameters
limit
The maximum value the double can have.
message
The message to return when the test fails.
Validates that the float value is less than or equal to limit.
Usage:
rules<Float> {
maximum(20.0f) { "must be less than or equal to 20.0" }
}
Content copied to clipboard
Parameters
limit
The maximum value the float can have.
message
The message to return when the test fails.
Validates that the integer value is less than or equal to limit.
Usage:
rules<Int> {
maximum(20) { "must be less than or equal to 20" }
}
Content copied to clipboard
Parameters
limit
The maximum value the integer can have.
message
The message to return when the test fails.
Validates that the long value is less than or equal to limit.
rules
Parameters
limit
The maximum value the long can have.
message
The message to return when the test fails.