Validate that the string matches the provided regular expression pattern.
B matches(RegExp pattern, {String? message}) { return add(stringMatchesPattern(pattern), message: message); }