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.IdentityErrorDescriberused to provider error messages.public UserValidator(IdentityErrorDescriber errors = null)
-
Properties¶
-
Microsoft.AspNetCore.Identity.UserValidator<TUser>.Describer¶ Gets the
Microsoft.AspNetCore.Identity.IdentityErrorDescriberused to provider error messages for the currentMicrosoft.AspNetCore.Identity.UserValidator`1.Return type: Microsoft.AspNetCore.Identity.IdentityErrorDescriber Returns: Yhe Microsoft.AspNetCore.Identity.IdentityErrorDescriberused to provider error messages for the currentMicrosoft.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: - manager (Microsoft.AspNetCore.Identity.UserManager<TUser>) – The
Microsoft.AspNetCore.Identity.UserManager`1that can be used to retrieve user properties. - user (TUser) – The user to validate.
Return type: System.Threading.Tasks.Task<Microsoft.AspNetCore.Identity.IdentityResult>
Returns: The
System.Threading.Tasks.Taskthat represents the asynchronous operation, containing theMicrosoft.AspNetCore.Identity.IdentityResultof the validation operation.public virtual Task<IdentityResult> ValidateAsync(UserManager<TUser> manager, TUser user)
- manager (Microsoft.AspNetCore.Identity.UserManager<TUser>) – The
-