password_rules library
Password policy as a plain Dart value, shared by a Flutter app and its backend.
Classes
- CommonPasswordsRule
- The password is not one of the thousand most common leaked passwords, compared case-insensitively.
- CountRule
- A built-in rule about how many of something the password contains.
- CustomRule
- A rule defined by the caller: a label already in the user's language and a predicate.
- DigitsRule
- The password contains at least count decimal digits, from any script.
- LettersRule
- The password contains at least count letters, from any script.
- LowercaseRule
- The password contains at least count lowercase letters.
- MatchRule
- The password equals the value other returns, typically the text of a confirmation field.
- MaxLengthRule
- The password has at most count user-perceived characters.
- MinLengthRule
- The password has at least count user-perceived characters.
- PasswordRule
- A requirement a password can be checked against.
- PasswordRules
- The rules a password has to satisfy.
- PasswordRuleStrings
- The labels of the rules, the strength levels and the rule states.
- PasswordValidation
- The outcome of checking one password against a PasswordRules.
- SpecialCharactersRule
- The password contains at least count characters that are not letters, combining marks, numbers or whitespace.
- UppercaseRule
- The password contains at least count uppercase letters.
Enums
- PasswordStrength
- How much of a PasswordRules a password satisfies.
Typedefs
- PasswordRuleLabel = String Function(int count)
- Builds the label of one rule from the count the rule requires.
- PasswordStrengthLabel = String Function(PasswordStrength strength)
- Builds the label of a strength level.