this post was submitted on 27 Jan 2024
7 points (100.0% liked)
JavaScript
1989 readers
1 users here now
founded 1 year ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
Check this out:
https://stackoverflow.com/questions/7002230/trigger-standard-html-validation-form-without-using-submit-button#17698873
Thank @[email protected]
it's look like that that code only verify the form when submitting.. I need to check the validity when the element has been loaded.
btw
checkValidity()
do not solve this issue as it returnTrue
when the length is longer thanmaxlength
! O_o I guess this is were is lying the "bug"My two cent
For me this is a huge flaw ! I don't understand how we (dev) are we still developing on "standard" that are so f*ck-up..There are several proposed workarounds there, like
https://caniuse.com/constraint-validation