noRepeats static method

Validator<String> noRepeats({
  1. String? error,
})

Implementation

static Validator<String> noRepeats({String? error}) => (value, context) {
      if (!context.resources.repeatPattern.hasMatch(value)) {
        return (true, null);
      }
      return (false, error ?? context.errors.passwordErrors.noRepeats());
    };