-
-
Notifications
You must be signed in to change notification settings - Fork 9
Validation process #69
Description
Hi,
I'm not sure that I understood everything correctly.
I switch from Blazored library and now I have some troubles with my code.
Before If I had my own validation process manually maintained at the custom button - I called Validator.ValidateAsync and GUI was refreshed with wrong elements red borders.
Now if I do the same - GUI is not refreshed. To do the same I have to call editContext.Validate.
So - maybe I'm wrong with something - or it is breaking change and should be mentioned at description?
Example:
private EditForm EditFormRef { get; set; } = null!;
private FluentValidator Validator { get; set; } = null!;
<EditForm Model="@Password" Context="_" @ref="EditFormRef">
<FluentValidator Validator="@(new PasswordDataValidator())" @ref="Validator"/>
This is not reacting at GUI
if (Validator.Validator is IValidator validator)
{
await validator.ValidateAsync(Password);
}
But this has impact GUI
EditFormRef.EditContext.Validate();
If my thoughts are right - Is it a chance to support validation process from validator level?