notEmpty

fun <V> ArrayRuleBuilder<V>.notEmpty(message: () -> String)

Validates that the array is not empty.

Usage:

rules<Array<String>> {
notEmpty { "must be not empty" }
}

Parameters

message

The message to return when the test fails.


fun <V> CollectionRuleBuilder<V>.notEmpty(message: () -> String)

Validates that the collection is not empty.

Usage:

rules<Collection<String>> {
notEmpty { "must not be empty" }
}

Parameters

message

The message to return when the test fails.


fun StringRuleBuilder.notEmpty(message: () -> String)

Validates that the string value is not empty.

Usage:

rules<String> {
notEmpty { "must be not empty" }
}

Parameters

message

The message to return when the test fails.