validatePassword static method

String? validatePassword(
  1. String password
)

Firebase's own floor is 6 characters — rejected locally rather than round-tripped to the server's WEAK_PASSWORD.

Implementation

static String? validatePassword(String password) {
  if (password.length < 6) {
    return 'Password must be at least 6 characters.';
  }
  return null;
}