Describe the bug
Auto Validation: when the form is loaded all error messages are displayed.
(It makes no sense for the user to open a form and see a large form full of error messages, before ever filling in the form).
To Reproduce
https://materialdemo.blazorise.com/tests/validations
Expected behavior
By default on first form load, the form is to display no error messages, only after the form has been submitted activate auto validation.
Example
https://www.matblazor.com/EditContext
https://mdbootstrap.com/docs/jquery/forms/validation/
Not sure really. I like how it works currently as it immediately gives a visual cue what is missing on a form. But I will consider it and maybe add some kind of _behavior_ enum that will define other approaches, like:
ValidationBehavior (or ValidationActivation)
OnLoadOnFirstChangePersonally I like the standard behavior of every other error form validation, rather than loading a form and see error messages everywhere.
Typical a user fills out a form and clicks submit and then error validation messages are displayed.
The error message disappears once the field contains a valid input.
<Validations @ref="_validations" Mode="ValidationMode.Auto" Model="@_inputFormRec" ValidateOnLoad="false">
....
</Validations>
Default (when not set)
Mode = ValidationMode.Auto
ValidateOnLoad = false
Sounds reasonable. I will put it on backlog for the next release!
Sounds reasonable. I will put it on backlog for the next release!
thanks Mladen
How this feature coming along?
I have not started it yet. The plan is to do it after I finish some refactorings that I already started. It will definitely be in the next release, don't worry.
Done! I will later publish it on MyGet as part of first preview for v0.9.1
Published!