passwordMin6Chars static method

String? passwordMin6Chars(
  1. String? string
)

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) {
  if (string == null || string.isEmpty || string.runes.length >= 6) {
    return null;
  }
  return FieldBlocValidatorsErrors.passwordMin6Chars;
}