maxLength static method

Validator maxLength(
  1. int max, {
  2. String? message,
})

Max length

Implementation

static Validator maxLength(int max, {String? message}) {
  return (String? value) {
    if (value != null && value.length > max) return message ?? FVMessages.tooLong(max);
    return null;
  };
}