maxLength method
Adds a MaxLengthRule to the validator.
maxLength is the maximum allowed length for the field.
errorMessage is an optional custom error message.
Implementation
Validator maxLength(int maxLength, {String? errorMessage}) {
addRule(MaxLengthRule(maxLength, errorMessage: errorMessage));
return this;
}