Blazored / FluentValidation

A library for using FluentValidation with Blazor
https://blazored.github.io/FluentValidation/
MIT License
597 stars 85 forks source link

[Question] Force validation if value changes programmatically #185

Open giarico opened 1 year ago

giarico commented 1 year ago

Hello,

I have this validation rule: RuleFor(p => p.CustomerId).NotNull().WithMessage("Customer field is required")

If I submit the form without setting the CustomerId field, an error is show... and this is correct. But if I fill the CustumerId field programmatically, the error doesn't disappear until I press again the submit button.

How can I do to force the validation of the field? (but only if the validation is already triggered)

Thank you!