UserValidator<TUser> Class

 

Represents a class that validates users before they are saved.

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

Inheritance Hierarchy

System.Object
  Microsoft.AspNet.Identity.UserValidator<TUser, TKey>
    Microsoft.AspNet.Identity.UserValidator<TUser>

Syntax

public class UserValidator<TUser> : UserValidator<TUser, string>
where TUser : class, IUser<string>
generic<typename TUser>
where TUser : ref class, IUser<String^>
public ref class UserValidator : UserValidator<TUser, String^>
type UserValidator<'TUser when 'TUser : not struct and IUser<string>> = 
    class
        inherit UserValidator<'TUser, string>
    end
Public Class UserValidator(Of TUser As { Class, IUser(Of String) })
    Inherits UserValidator(Of TUser, String)

Type Parameters

  • TUser
    The type of the user.

Constructors

Name Description
System_CAPS_pubmethod UserValidator<TUser>(UserManager<TUser, String>)

Initializes a new instance of the UserValidator<TUser> class.

Properties

Name Description
System_CAPS_pubproperty AllowOnlyAlphanumericUserNames

Gets or sets whether to allow only alphanumeric characters for the user name.(Inherited from UserValidator<TUser, TKey>.)

System_CAPS_pubproperty RequireUniqueEmail

Gets or sets whether unique e-mail is needed for validating the user.(Inherited from UserValidator<TUser, TKey>.)

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_protmethod MemberwiseClone()

(Inherited from Object.)

System_CAPS_pubmethod ToString()

(Inherited from Object.)

System_CAPS_pubmethod ValidateAsync(TUser)

Asynchronously validates a user before saving.(Inherited from UserValidator<TUser, TKey>.)

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