regex static method

TextValidator regex(
  1. RegExp regex, {
  2. MatchType matchType = MatchType.Entire,
  3. bool trim = false,
  4. bool allowEmpty = false,
  5. String message = "格式不符",
})

Implementation

static TextValidator regex(RegExp regex, {MatchType matchType = MatchType.Entire, bool trim = false, bool allowEmpty = false, String message = "格式不符"}) {
  return RegexValidator(regex: regex, matchType: matchType, trim: trim, allowEmpty: allowEmpty, message: message).call;
}