allMet static method

bool allMet(
  1. List<RegexModel> rules,
  2. String value, {
  3. bool optional = false,
})

Whether value meets every rule; empty is valid only when optional.

Implementation

static bool allMet(
  List<RegexModel> rules,
  String value, {
  bool optional = false,
}) =>
    (optional && value.isEmpty) || rules.every((rule) => rule.matches(value));