Blazored / FluentValidation

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

[Question] how to update validation message for field. #209

Closed abbottmw closed 8 months ago

abbottmw commented 9 months ago

I have an additional problem with this. I have a list of checkboxes and checking the checkboxes i update a SelectedString property with the values selected. This works, but the validation message doesn't update/appear when you check a checkbox.

Do I need to implement an INotifyPropertyChanged? Tell the editcontext NotifyFieldChanged or NotifyValidationStateChanged?

Radio buttons work fine. It's when I use checkboxes to populate a SelectedString that the validation message doesn't show/hide when the SelectedString property changes. Is there a better way to bind a value of the results of all the checkboxes checked? I'm using the oninput event since the @bind-Value uses the onchange.