minLength static method

FormFieldValidator<String> minLength(
  1. int length, [
  2. String? message
])

Fails when the value is shorter than length characters.

Implementation

static FormFieldValidator<String> minLength(int length, [String? message]) =>
    (value) => (value ?? '').length < length
    ? (message ?? 'Must be at least $length characters')
    : null;