DigitRule class

This rule verify if password contains at least minimumNbDigits digits.

Defaults to 1 digit minimum.

isMandatory is true by default.

Inheritance

Constructors

DigitRule({int minimumNbDigits = 1, bool isMandatory = true, String? name})

Properties

hashCode int
The hash code for this object.
no setterinherited
impact int
Used to compute the overall score of the password :
finalinherited
mandatory bool
Define if this rule is mandatory or not, if this rule is not respected and is mandatory, the password will not be validated.
finalinherited
minimumNbDigits int
Minimal number of digits in the password.
final
minimumScore double
Minimum score for the rule to be validated.
finalinherited
name String?
Name of the rule, this exists for convenience and will not be used by the PasswordPolicy. All defaults Rules provided by this package have a default name, so if you're using one of them, name cannot be null.
finalinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

computeRuleScore(String password) double
Calculate the score of the rule.
override
isRuleRespected(String password) bool
Function that verify if the rule is respected or not.
inherited
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