maxLength static method

ValidatorFunction maxLength(
  1. int maxLength
)

Gets a validator that requires the length of the control's value to be less than or equal to the provided maxLength.

The argument maxLength must not be null.

Implementation

static ValidatorFunction maxLength(int maxLength) =>
    MaxLengthValidator(maxLength).validate;