minLength method

Validator minLength(
  1. int minLength, {
  2. String? errorMessage,
})

Adds a MinLengthRule to the validator.

minLength is the minimum number of characters required. errorMessage is an optional custom error message.

Implementation

Validator minLength(int minLength, {String? errorMessage}) {
  addRule(MinLengthRule(minLength, errorMessage: errorMessage));
  return this;
}