match method
Adds a MatchRule to the validator.
The pattern is the regular expression pattern to match.
The errorMessage is the optional error message to display if validation fails.
Implementation
Validator match(Pattern pattern, {String? errorMessage}) {
addRule(MatchRule(pattern, errorMessage: errorMessage));
return this;
}