minSize

fun <V> ArrayRuleBuilder<V>.minSize(limit: Int, message: () -> String)

Validates that the array size is at least limit.

Usage:

rules<Array<String>> {
minSize(3) { "must have at least 3 items" }
}

Parameters

limit

The minimum number of elements the array must have.

message

The message to return when the test fails.


fun <V> CollectionRuleBuilder<V>.minSize(limit: Int, message: () -> String)

Validates that the collection size is at least limit.

Usage:

rules<Collection<String>> {
minSize(3) { "must have at least 3 items" }
}

Parameters

limit

The minimum number of elements the collection must have.

message

The message to return when the test fails.