RoleValidator<TRole> Class

Provides the default validation of roles.

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

Syntax

public class RoleValidator<TRole> : IRoleValidator<TRole> where TRole : class
class Microsoft.AspNetCore.Identity.RoleValidator<TRole>

Constructors

RoleValidator(Microsoft.AspNetCore.Identity.IdentityErrorDescriber)

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

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

Methods

ValidateAsync(Microsoft.AspNetCore.Identity.RoleManager<TRole>, TRole)

Validates a role as an asynchronous operation.

Arguments:
Return type:

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

Returns:

A System.Threading.Tasks.Task`1 that represents the Microsoft.AspNetCore.Identity.IdentityResult of the asynchronous validation.

public virtual Task<IdentityResult> ValidateAsync(RoleManager<TRole> manager, TRole role)