Validation doesn't update on change

I'm trying to add validation to some forms using the Radzen Components for Blazor. While they do validate properly, like a standard InputText, it only does so upon trying to submit. For example, if I've set the field to be required, I can get it to show a validation-message but the message won't go away when I put text into the field, only when I try to submit again.

This is a basic example for a Login-form.

<EditForm Model="viewModel" OnValidSubmit="LoginAsync"
	FluentValidationValidator /

	<InputText @bind-Value="viewModel.Username" />
	<ValidationMessage For="@(() => viewModel.Username)" />

	<RadzenPassword @bind-Value="viewModel.Password" />
	<ValidationMessage For="@(() => viewModel.Password)" />

	<button type="submit">Login</button>
</EditForm>

Here, both fields are required and both will show the error message when trying to submit. However, only the username will have its warning message go away upon entering text into the field.

Is there something I'm missing? I noticed that there are some Validators within the package, perhaps these are required together with the other Radzen components? If that's the case, does anyone care to show how I could add, say, the RadzenRequiredValidator to this basic example?

Edit: Had to remove the tags around EditForm for these to show, so that it's easier to read for others.

Hi @Valerian,

You want to construct the same EditForm however using Radzen Template Form and other Radzen input components?

I've corrected the formatting in your post. Here is how you can post code blocks:
image

I'll check RadzenPassword behavior and will post more info.

    <RadzenTemplateForm Data="viewModel" Submit="@((LoginViewModel args) => { Test(args); })">
        <RadzenTextBox @bind-Value="viewModel.Username" Name="Username" />
        <RadzenRequiredValidator Component="Username" Text="You must enter a username." />
        <RadzenPassword @bind-Value="viewModel.Password" Name="Password" />
        <RadzenRequiredValidator Component="Password" Text="You must enter a password." />
        <RadzenButton ButtonType="ButtonType.Submit" Text="Login" />
    </RadzenTemplateForm>

I've tried this as an alternative. Now, if the field is empty before I try to submit, the validation-messages appear, and adding things into the fields will make the validation-messages go away. However, I can empty the fields and it will allow me to submit, even though the fields have now been emptied again.

I'd also much prefer to be able to use a FluentValidationValidator, since then I can setup any form of validation that I'd like, for example ensure that a given start date is before a given end date. So if there's a way to ensure that Radzen-inputs, of various kinds, updates their validation when values changes, that'd be lovely.

Thanks for all your help.

An update on validation: I've implemented a page where I use fluent validation for two input dates using the RadzenDatePicker where both most be future dates and the end-date must be later than the start date. When I update these values, all validation appear to be updated automatically, for both the two dates and any other validation-messages currently showing but have been updated since being invalid. And this is of course a good thing. However, the not so good thing about the validation for the dates is that, if they were invalid to being with, as soon as I change them to valid, the form will submit, without manually clicking on submit. Which is not a very user friendly experience.