pattern
Deprecated
Use `match` instead. This will be removed in a future version.
Replace with
match(pattern, message)
Content copied to clipboard
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.
Deprecated
Use `match` instead. This will be removed in a future version.
Replace with
match(pattern, message)
Content copied to clipboard
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.