Class MinimumLengthPasswordRule
public sealed class MinimumLengthPasswordRule : IPasswordRule
- Inheritance
-
MinimumLengthPasswordRule
- Implements
- Inherited Members
Constructors
MinimumLengthPasswordRule(int)
public MinimumLengthPasswordRule(int minimumLength)
Parameters
minimumLengthint
Properties
Description
A description of this password rule.
public string Description { get; }
Property Value
Instructions
A string that may be shown to the user when their password is deemed invalid by this rule.
public string Instructions { get; }
Property Value
MinimumLength
public int MinimumLength { get; }
Property Value
Methods
IsValid(string, IEnumerable<string>?)
Validate the supplied password against this rule.
public bool IsValid(string password, IEnumerable<string>? userDataStrings = null)
Parameters
passwordstringThe password to validate
userDataStringsIEnumerable<string>Strings that the application knows about the user supplying the password that this rule may use as part of password validation.
Returns
- bool
Whether the supplied password is valid under this rule.