UserValidator<TUser, TKey> 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, TKey> : IIdentityValidator<TUser>
where TUser : class, IUser<TKey>
where TKey : object, IEquatable<TKey>
generic<typename TUser, typename TKey>
where TUser : ref class, IUser<TKey>
where TKey : Object, IEquatable<TKey>
public ref class UserValidator : IIdentityValidator<TUser>
type UserValidator<'TUser, 'TKey when 'TUser : not struct and IUser<'TKey> when 'TKey : Object and IEquatable<'TKey>> = 
    class
        interface IIdentityValidator<'TUser>
    end
Public Class UserValidator(Of TUser As { Class, IUser(Of TKey) }, TKey As { Object, IEquatable(Of TKey) })
    Implements IIdentityValidator(Of TUser)

Type Parameters

  • TUser
    The type of the user in the validator.
  • TKey
    The type of the keys in the validator.

Constructors

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

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

Properties

Name Description
System_CAPS_pubproperty AllowOnlyAlphanumericUserNames

Gets or sets whether to allow only alphanumeric characters for the user name.

System_CAPS_pubproperty RequireUniqueEmail

Gets or sets whether unique e-mail is needed for validating the user.

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.

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