I'm in process of moving from <PackageReference Include="Blazored.FluentValidation" Version="2.2.0" /> to <PackageReference Include="Blazilla" Version="2.2.2" />.
On my page, I've made these changes:
<EditForm @ref="EditForm" Model="@Parent" @onsubmit:preventDefault>
<FluentValidationValidator @ref="FluentValidationValidator" />
to
<EditForm @ref="EditForm" Model="@Parent" @onsubmit:preventDefault>
<FluentValidator />
and
private Task<bool> ValidateAsync()
{
var validationResult = FluentValidationValidator!.Validate();
...
to
private Task<bool> ValidateAsync()
{
var validationResult = EditForm.EditContext!.Validate();
...
My page is complex, but the validation rules are simple.
These are my validators:
public class ParentValidator : AbstractValidator<ParentEntity>
{
public ParentValidator (IValidator<TestEntity> child1Validator)
{
...
RuleForEach(x => x.Children).SetValidator(child1Validator);
}
}
public class Child1Validator : AbstractValidator<Child1Entity>
{
public Child1Validator(IValidator<Child2Entity> child2Validator)
{
...
RuleForEach(x => x.Children)
.SetValidator(child2Validator);
}
}
public class Child2Validator : AbstractValidator<Child2Entity>
{
public Child2Validator ()
{
RuleLevelCascadeMode = CascadeMode.Stop;
...
}
}
When I try to check on DotTrace to see what's happening:
And if I comment out or revert back to Blazored, everything works again.
Ah, I need to point out that the Parent starts with 0 Childs.
Everything freezes when I click to add one new Child and it hangs for 50+ seconds.
I'm in process of moving from
<PackageReference Include="Blazored.FluentValidation" Version="2.2.0" />to<PackageReference Include="Blazilla" Version="2.2.2" />.On my page, I've made these changes:
to
and
to
My page is complex, but the validation rules are simple.
These are my validators:
When I try to check on DotTrace to see what's happening:
And if I comment out or revert back to Blazored, everything works again.
Ah, I need to point out that the Parent starts with 0 Childs.
Everything freezes when I click to add one new Child and it hangs for 50+ seconds.