minLength static method

PrismValidator minLength(
  1. int min, [
  2. String? message
])

Fails when the value is shorter than min characters.

Implementation

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