MudBlazor / MudBlazor

Blazor Component Library based on Material design with an emphasis on ease of use. Mainly written in C# with Javascript kept to a bare minimum it empowers .NET developers to easily debug it if needed.
http://mudblazor.com
MIT License
7.21k stars 1.18k forks source link

Form is considered valid even if converter produce an error #8781

Open LodiAleardo opened 3 weeks ago

LodiAleardo commented 3 weeks ago

Bug type

Other

Component name

No response

What happened?

I use a converter to convert from a custom type to string and vice versa. In the reproduction link I provided a simple example without the real conversion. The problem is that the form is considered valid and the OnValidSubmit triggered even if the field is marked invalid by the converter

Expected behavior

Form should be considered invalid if the converter produces an error and the correlated TextField is showing an error

Reproduction link

https://try.mudblazor.com/snippet/QuwoOoGwfxYcYsoz

Reproduction steps

  1. click on the field
  2. focus out and see the error message
  3. Click on Validate
  4. See that the form is considered valid

Relevant log output

No response

Version (bug)

6.19.1

Version (working)

No response

What browsers are you seeing the problem on?

Chrome

On which operating systems are you experiencing the issue?

Windows

Pull Request

Code of Conduct

LodiAleardo commented 3 weeks ago

After investigating I think that this error is related to https://github.com/MudBlazor/MudBlazor/issues/1696#issuecomment-1804509327