hasMinLength method
Instructs StringMust to make sure the given string
is at least len characters long.
Implementation
void hasMinLength(int len, [String? errorMessage]) {
_validators.add((value) {
if (value == null || value.length < len)
return errorMessage ?? 'String is shorter than $len.';
return '';
});
}