UserValidator<TUser> Class

Provides validation services for user classes.

Namespace
Microsoft.AspNetCore.Identity
Assemblies
  • Microsoft.AspNetCore.Identity

Syntax

public class UserValidator<TUser> : IUserValidator<TUser> where TUser : class
class Microsoft.AspNetCore.Identity.UserValidator<TUser>

Constructors

UserValidator(Microsoft.AspNetCore.Identity.IdentityErrorDescriber)

Creates a new instance of Microsoft.AspNetCore.Identity.UserValidator`1/

Arguments:errors (Microsoft.AspNetCore.Identity.IdentityErrorDescriber) – The Microsoft.AspNetCore.Identity.IdentityErrorDescriber used to provider error messages.
public UserValidator(IdentityErrorDescriber errors = null)

Properties

Microsoft.AspNetCore.Identity.UserValidator<TUser>.Describer

Gets the Microsoft.AspNetCore.Identity.IdentityErrorDescriber used to provider error messages for the current Microsoft.AspNetCore.Identity.UserValidator`1.

Return type:Microsoft.AspNetCore.Identity.IdentityErrorDescriber
Returns:Yhe Microsoft.AspNetCore.Identity.IdentityErrorDescriber used to provider error messages for the current Microsoft.AspNetCore.Identity.UserValidator`1.
public IdentityErrorDescriber Describer { get; }

Methods

ValidateAsync(Microsoft.AspNetCore.Identity.UserManager<TUser>, TUser)

Validates the specified <em>user</em> as an asynchronous operation.

Arguments:
Return type:

System.Threading.Tasks.Task<Microsoft.AspNetCore.Identity.IdentityResult>

Returns:

The System.Threading.Tasks.Task that represents the asynchronous operation, containing the Microsoft.AspNetCore.Identity.IdentityResult of the validation operation.

public virtual Task<IdentityResult> ValidateAsync(UserManager<TUser> manager, TUser user)