re method

StringType re(
  1. String re, {
  2. String? message,
})

requires the value to match a regular expression re the regular expression

Implementation

StringType re(String re, {String? message}) {
  var reExpr = RegExp(re);
  test<String>(
    type: String,
    name: "re",
    check: (s) => reExpr.hasMatch(s),
    message: message
  );

  return this;
}