Replies: 3 comments 3 replies
-
Having just checked with the latest nightly build, the inputs are now correctly showing their error messages on form submit. It is just the browser displayed message that I would like prevented, if possible? |
Beta Was this translation helpful? Give feedback.
-
Will it also be possible for the error-text attribute to overwrite the browser error messages when using constraint validation? |
Beta Was this translation helpful? Give feedback.
-
Hi, I can see there have been some updates made and the browser defaults are no longer showing with the nightly builds. Thanks! I would expect, after a submit, that the validity would continue to update on change/input for the fields. e.g. if a required field has been missed it flags as required when the form submits, and the message would clear once the user has made an input, or change to a different message like minimum character length. Is this the goal for the validity behavior or is this something I would need to handle with javascript? |
Beta Was this translation helpful? Give feedback.
-
Form validation isn't working as I would expect it to when using constraint validation.
According to the text-field docs
Text fields in a <form> will validate on submission, or by calling textField.reportValidity().
This doesn't seem to be working on form submit. I am able to run reportValidity on each field manually and that works as expected.
The other issue I have is that on form submit the browser pop-up errors show, which is redundant if the input errors are displaying.
Ideally, on submit I think the inputs should be validated and show their errors and the browser default display would be prevented.
Beta Was this translation helpful? Give feedback.
All reactions