PasswordValidator Class

 

Provides properties and methods that are used to validate some basic password policy like length and number of non alphanumerics.

Namespace:   Microsoft.AspNet.Identity
Assembly:  Microsoft.AspNet.Identity.Core (in Microsoft.AspNet.Identity.Core.dll)

Inheritance Hierarchy

System.Object
  Microsoft.AspNet.Identity.PasswordValidator

Syntax

public class PasswordValidator : IIdentityValidator<string>
public ref class PasswordValidator : IIdentityValidator<String^>
type PasswordValidator = 
    class
        interface IIdentityValidator<string>
    end
Public Class PasswordValidator
    Implements IIdentityValidator(Of String)

Constructors

Name Description
System_CAPS_pubmethod PasswordValidator()

Initializes a new instance of the PasswordValidator class.

Properties

Name Description
System_CAPS_pubproperty RequireDigit

Gets or sets whether the password requires a numeric digit ('0' - '9').

System_CAPS_pubproperty RequiredLength

Gets or sets the minimum required password length.

System_CAPS_pubproperty RequireLowercase

Gets or sets whether the password requires a lower case letter ('a' - 'z').

System_CAPS_pubproperty RequireNonLetterOrDigit

Gets or sets whether the password requires a non-letter or digit character.

System_CAPS_pubproperty RequireUppercase

Gets or sets whether the password requires an upper case letter ('A' - 'Z').

Methods

Name Description
System_CAPS_pubmethod Equals(Object)

(Inherited from Object.)

System_CAPS_protmethod Finalize()

(Inherited from Object.)

System_CAPS_pubmethod GetHashCode()

(Inherited from Object.)

System_CAPS_pubmethod GetType()

(Inherited from Object.)

System_CAPS_pubmethod IsDigit(Char)

Determines whether the character is a digit between '0' and '9'.

System_CAPS_pubmethod IsLetterOrDigit(Char)

Determines whether the character is a letter or a digit.

System_CAPS_pubmethod IsLower(Char)

Determines whether the character is between 'a' and 'z'.

System_CAPS_pubmethod IsUpper(Char)

Determines whether the character is between 'A' and 'Z'.

System_CAPS_protmethod MemberwiseClone()

(Inherited from Object.)

System_CAPS_pubmethod ToString()

(Inherited from Object.)

System_CAPS_pubmethod ValidateAsync(String)

Asynchronously ensures that the string is of the required length and meets the configured requirements.

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

See Also

Microsoft.AspNet.Identity Namespace
ASP.NET Identity

Return to top