MudForm.IsValid Defaults to `false` with Required Fields
#5,196 opened on Sep 1, 2022
Repository metrics
- Stars
- (10,394 stars)
- PR merge metrics
- (Avg merge 6d 6h) (108 merged PRs in 30d)
Description
Bug type
Component
Component name
mudForm
What happened?
<MudForm Model="@_model" @ref="@_form" @bind-IsValid="@_success" Validation="@(_loginValidator.ValidateValue)"> .... @{ bool _success=true; } when mudform initialize not any change, I think this "_success" should not be change. right? but actually, the _success value always change to false, even _loginValidator return vaild( not any errors)
Expected behavior
I think IsValid does not change when mudform initializes.
Reproduction link
https://try.mudblazor.com/snippet/mamGEtEFuJcosnnE
Reproduction steps
<MudTextField @bind-Value="model.Name"
For="@(() => model.Name)"
Immediate="true"
Required="true"
Label="Name" />
when Required="true", even default set value. ...
Relevant log output
No response
Version (bug)
6.xxx
Version (working)
No response
What browsers are you seeing the problem on?
Chrome
On what operating system are you experiencing the issue?
Windows
Pull Request
- I would like to do a Pull Request
Code of Conduct
- I agree to follow this project's Code of Conduct