PasswordStrengthCondition
public struct PasswordStrengthCondition : ConfigurableCondition
The PasswordStrengthCondition
checks for the strength of a password string.
The strength is measured on five simple criteria:
- contains lower case characters
- contains upper case characters
- contains numeric characters
- contains special characters (e.g /‘;~)
- is more than 8 characters long
Each of these matched criteria moves the password strength of the string up one strength, strength is measured on PasswordStrength
.
If the password strength matches or is above the required strength than the condition will pass.
-
Declaration
Swift
public var localizedViolationString: String
-
Declaration
Swift
public let regex: String
-
Declaration
Swift
public var shouldAllowViolation: Bool
-
Declaration
Swift
public let configuration: PasswordStrengthConfiguration
-
Declaration
Swift
public init(configuration: PasswordStrengthConfiguration)