StringRule

fun StringRule(predicate: String.() -> Boolean, message: () -> String): StringRule

A rule that tests the string value.

Return

Creates a new instance of StringRule.

Parameters

predicate

The predicate to test the string value. Returns true if the test passes; false otherwise.

message

The message to return when the test fails.