minLength static method
Implementation
static String? minLength(String? value, int min, [String? fieldName]) {
final name = fieldName ?? 'This field';
if (value == null || value.trim().length < min) {
return '$name must be at least $min characters.';
}
return null;
}