this repository will not be maintaned, since it has been integrated in the Blazorise repo (https://blazorise.com/news/release-notes/110), the Nuget Packages are available as before and they are now also owned by Blazorise. (https://github.com/Megabit/Blazorise/tree/master/Source/Extensions/Blazorise.FluentValidation)
the Blazorise Team added an asyc method to the IValidationHandler interface, witch is a breacking change for BlasorizeFluentValidation, this is fixed in this version.
Blazorise has a couple of breacking changes since 0.9.3 and Validation is one of the Areas that has been refactored. because of that a new implementation of the FluentValidation support was required.
First we have to register the required services
services.AddFluentValidationHandler();
<Validation HandlerType="HandlerTypes.FluentValidation">
Note: you can also use typeof(FluentValidationHandler) instead of HandlerTypes.FluentValidation
so know you just have to implement your Model validatores and register them and you are good to go. I also added a sample Blazor Application.
Note: this is compatible with Blazorise 0.9.2.x (there are breacking changes in 0.9.3 concerning the validation topic - i will provide some help as soon as i can) Is an implementation of the Balsorise IEditContextValidator to support FluentValidation.
this implementation is based on the EditoContextValidatior and the FluentValidator.
First we have to register the required services
services.AddBlazoriseWithFluentValidation();
Note: the AddBlazoriseWithFluentValidation calls AddBlazorise method internally
so know you just have to implement your Model validatores and register them and you are good to go. I also added a sample Blazor Application.
@icon-info-circle To learn more about Blazorise take a look at the docs
@icon-info-circle To learn more about FluentValidation take a look at the docs