matches static method
Ensures the string matches the given pattern.
Implementation
static String? Function(String?) matches(
Pattern pattern, {
String errorMessage = 'Invalid format',
}) {
return _build(errorMessage, (v) => v.matches(pattern));
}