Creates a regex validation rule. regex is the pattern the value must match. message is the error message if the value does not match.
regex
message
const RegexRule(this.regex, {required this.message});