SpecialCharacterRule class

This rule verify if password contains at least minimumSpecialCharacters special character (punctuation and symbols), also checks for unicode special characters.

Defaults to 1 special character minimum.

isMandatory is true by default.

Inheritance

Constructors

SpecialCharacterRule({int minimumSpecialCharacters = 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
minimumScore double
Minimum score for the rule to be validated.
finalinherited
minimumSpecialCharacters int
Minimal number of special characters in the password.
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.
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