maxLength static method

ValidationRule<String> maxLength(
  1. int max, {
  2. String? message,
})

Creates a MaxLength validation rule.

This rule checks if a string's length is less than or equal to max. It can include a custom validation message.

Implementation

static ValidationRule<String> maxLength(int max, {String? message}) =>
    MaxLength(max, message: message);