minLength function
Minimum trimmed length.
Implementation
FieldValidator minLength(int n, {String? message}) {
final text = message ?? 'MÃnimo de $n caracteres';
return (value) {
if (value == null || value.trim().length < n) {
return text;
}
return null;
};
}