minLength static method

ValidationRule minLength(
  1. int length, [
  2. String? message
])

Implementation

static ValidationRule minLength(int length, [String? message]) {
  return ValidationRule((value) {
    if (value == null || value.isEmpty) return null;
    return value.length < length ? (message ?? 'Minimum $length characters required') : null;
  });
}