pattern
Validates that the string matches the pattern.
Usage:
rules<String> {
pattern("^[A-Za-z]+$") { "must be alphabetic" }
}
Content copied to clipboard
Parameters
pattern
The regular expression pattern the string must match.
message
The message to return when the test fails.
Validates that the string matches the pattern.
Usage:
rules<String> {
pattern(Regex("^[A-Za-z]+$")) { "must be alphabetic" }
}
Content copied to clipboard
Parameters
pattern
The regular expression pattern the string must match.
message
The message to return when the test fails.