maxLength
Validates that the CharSequence length is no more than limit characters.
Usage:
rules<CharSequence> {
maxLength(20) { "must be at no more 20 characters" }
}
Content copied to clipboard
Parameters
limit
The maximum number of characters the CharSequence can have.
message
The message to return when the test fails.
Validates that the string length is no more than limit characters.
Usage:
rules<String> {
maxLength(20) { "must be at no more 20 characters" }
}
Content copied to clipboard
Parameters
limit
The maximum number of characters the string can have.
message
The message to return when the test fails.