maxSize
Validates that the array size is no more than limit.
Usage:
rules<Array<String>> {
maxSize(20) { "must have at no more 20 items" }
}
Content copied to clipboard
Parameters
limit
The maximum number of elements the array can have.
message
The message to return when the test fails.
Validates that the collection size is no more than limit.
Usage:
rules<Collection<String>> {
maxSize(20) { "must have at no more 20 items" }
}
Content copied to clipboard
Parameters
limit
The maximum number of elements the collection can have.
message
The message to return when the test fails.