RegexRule constructor

const RegexRule(
  1. RegExp regex, {
  2. required String message,
})

Creates a regex validation rule. regex is the pattern the value must match. message is the error message if the value does not match.

Implementation

const RegexRule(this.regex, {required this.message});