Closed pzapo closed 3 years ago
I 've found solution using dirty but it is not enough. I am able to disable submit untill one of the fields is touched but then situation happens again. Second field doesn't show required error.
Errors are show when ALL the following conditions are met:
This is done intentionally to avoid the noise of showing errors in every field when the user hasn't even touched them. In my projects, I am usually disabling the submit button when the form is not valid.
I am open for discussion about the correct behaviour on this issue though. What do you think?
I agree with you, I've followed your path with disabling the button.
I have form with two fields and both of them are required, when user clicks submit before entering any data no error is shown and nothing happens. Form return corrects errors in "error" object but nothing is displayed in UI.
Can I somehow force errors messages on not touched and empty form?