passwordMin6Chars static method
Check if the string
has min 6 chars
if string
is not null and not empty.
Returns null
if is valid.
Returns FieldBlocValidatorsErrors.passwordMin6Chars if is not valid.
Implementation
static String? passwordMin6Chars(String? string, {String? errorMessage}) {
if (string == null || string.isEmpty || string.runes.length >= 6) {
return null;
}
return errorMessage?? FieldBlocValidatorsErrors.passwordMin6Chars;
}