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 | |
---|---|---|
UserValidator<TUser, TKey>(UserManager<TUser, TKey>) | Initializes a new instance of the UserValidator<TUser, TKey> class. |
Properties
Name | Description | |
---|---|---|
AllowOnlyAlphanumericUserNames | Gets or sets whether to allow only alphanumeric characters for the user name. |
|
RequireUniqueEmail | Gets or sets whether unique e-mail is needed for validating the user. |
Methods
Name | Description | |
---|---|---|
Equals(Object) | (Inherited from Object.) |
|
Finalize() | (Inherited from Object.) |
|
GetHashCode() | (Inherited from Object.) |
|
GetType() | (Inherited from Object.) |
|
MemberwiseClone() | (Inherited from Object.) |
|
ToString() | (Inherited from Object.) |
|
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