Blazorise FluentValidation API

Review the handler and registration method used to connect FluentValidation validators to Blazorise validation components.

For setup instructions and examples, see the FluentValidation documentation.

API

FluentValidationHandler

Resolves the registered FluentValidation validator for a model and reports its result through the Blazorise validation lifecycle.

Methods

MethodReturnParameters
ValidatevoidIValidation validation, object newValidationValue

Runs the matching validator synchronously and updates the validation status and messages.
ValidateAsyncTaskIValidation validation, object newValidationValue, CancellationToken cancellationToken = default

Runs the matching validator asynchronously and updates the validation status and messages.

AddBlazoriseFluentValidation

Extension method

MethodReturnParameters
AddBlazoriseFluentValidationIServiceCollectionIServiceCollection services

Registers FluentValidationHandler as a scoped service and returns the service collection.