regex static method
Creates a Regex validation rule.
This rule checks if a string matches the specified regex
.
It can include a custom validation message.
Implementation
static ValidationRule<String> regex(RegExp regex, {String? message}) =>
Regex(regex, message: message);