Skip to content

aladotnet/BlazoriseFluentValidation

Repository files navigation

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)

BlazoriseFluentValidation 0.9.4

the Blazorise Team added an asyc method to the IValidationHandler interface, witch is a breacking change for BlasorizeFluentValidation, this is fixed in this version.

BlazoriseFluentValidation 0.9.3

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.

Usage

First we have to register the required services

services.AddFluentValidationHandler();

Blazor markup

<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.

BlazoriseFluentValidation 0.9.2

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.

Usage

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