FormValidator.password constructor

FormValidator.password({
  1. int strength = 1,
  2. String? message,
})

Validate a password with a strength of 1 or 2 strength 1: 1 uppercased letter, 1 digit, 8 characters strength 2: 1 uppercased letter, 1 digit, 1 special character, 8 characters message The message to display if the password is invalid

Implementation

FormValidator.password({int strength = 1, this.message}) {
  assert(strength > 0 && strength < 3,
      "Password strength must be between 1 and 2");
  this.rules = "password_v$strength";
}