PasswordValidationConfig class final
Configuration for password validation.
Constructors
-
PasswordValidationConfig({int minLength = 8, int maxLength = 128, bool requireUppercase = true, bool requireLowercase = true, bool requireDigit = true, bool requireSpecialCharacter = true, bool rejectCommonPasswords = true, bool rejectRepeatedCharacters = true, bool rejectSequentialPatterns = true, int minSequentialRun = 4, Set<
String> commonPasswords = _defaultCommonPasswords, List<String> commonPrefixes = _defaultCommonPrefixes}) -
Creates a password validation config.
const
- PasswordValidationConfig.lenient()
-
Lenient preset that only enforces a minimum length.
factory
- PasswordValidationConfig.strong()
-
Strong preset equivalent to the package default.
factory
Properties
-
commonPasswords
→ Set<
String> -
List of exact blacklisted passwords.
final
-
commonPrefixes
→ List<
String> -
List of blacklisted prefixes.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- maxLength → int
-
Maximum allowed password length.
final
- minLength → int
-
Minimum allowed password length.
final
- minSequentialRun → int
-
Minimum run length that counts as sequential.
final
- rejectCommonPasswords → bool
-
Whether common passwords should be rejected.
final
- rejectRepeatedCharacters → bool
-
Whether repeated-character passwords should be rejected.
final
- rejectSequentialPatterns → bool
-
Whether sequential character runs should be rejected.
final
- requireDigit → bool
-
Whether at least one digit is required.
final
- requireLowercase → bool
-
Whether at least one lowercase letter is required.
final
- requireSpecialCharacter → bool
-
Whether at least one special character is required.
final
- requireUppercase → bool
-
Whether at least one uppercase letter is required.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited