minLength static method
Validates that the input meets a minimum length.
Implementation
static String? minLength(
String? value,
int length, {
String fieldName = 'This field',
}) {
if (value == null || value.length < length) {
return '$fieldName must be at least $length characters';
}
return null;
}