Hey,
iam evaluating the blazor components for our new project. Our customer has complex validation rules so FluentValidation is for us required. In my PoC i tried to use FluenValidation inside a PopOut but i was not able. Is there a solution to use FluenValidation in the PopOut instead of datanotations? I'm using this package https://github.com/ryanelian/FluentValidation.Blazor. This is my Code
<FluentValidator Validator="validator" /> <TelerikGrid Data="personList" Pageable="false" Sortable="true" Resizable="false" EditMode="GridEditMode.Popup" OnUpdate="@UpdateOrCreateHandler" OnDelete="@DeleteHandler" OnCreate="@UpdateOrCreateHandler">...</TelerikGrid>private List<Person> personList;
PersonValidator validator = new PersonValidator();
With the component call "<FluentValidator Validator="validator" />" i get this error:
blazor.webassembly.js:1 crit: Microsoft.AspNetCore.Components.WebAssembly.Rendering.WebAssemblyRenderer[100] Unhandled exception rendering component: DataAnnotationsValidator requires a cascading parameter of type EditContext. For example, you can use DataAnnotationsValidator inside an EditForm.System.InvalidOperationException: DataAnnotationsValidator requires a cascading parameter of type EditContext. For example, you can use DataAnnotationsValidator inside an EditForm. at Microsoft.AspNetCore.Components.Forms.FluentValidator.OnInitialized () <0x3c7cef0 + 0x00018> in <filename unknown>:0 at Microsoft.AspNetCore.Components.ComponentBase.RunInitAndSetParametersAsync () <0x306e830 + 0x00030> in <filename unknown>:0
Is there a solution to work with fluentvalidation?