ValidationRule class abstract

Interface that helps to create ValidationRules.

Implementers

Constructors

ValidationRule({int impact = 1, double minimumScore = 1.0, required bool mandatory, String? name})
Default constructor, define the impact, the minimumScore and the name of this rule. Also define if the rule is mandatory or not.

Properties

hashCode int
The hash code for this object.
no setterinherited
impact int
Used to compute the overall score of the password :
final
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.
final
minimumScore double
Minimum score for the rule to be validated.
final
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.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

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