minLength method

FormFieldValidator<String> minLength (
  1. int minLength,
  2. {String message}
)

Implementation

static FormFieldValidator<String> minLength(int minLength, {String message}) {
  return (fieldValue) {
    if (Validator.minLength(fieldValue, minLength)) {
      return null;
    } else {
      return message ?? "Field must be of minimum length of $minLength";
    }
  };
}