7
submitted 2 years ago* (last edited 2 years ago) by Rick_C137@programming.dev to c/javascript@programming.dev

~~ cross-posted from: https://programming.dev/post/9179830 ~~

Hi,

I'm loading some content with XHR (aka Ajax) the loaded input elements that have a invalid value assigned are not checked trough the validation process.

so the CSS styling with :invalid is for example not working etc..

is there a way to force the validation process on those elements ?

edit: Browser is Firefox

Thanks.

you are viewing a single comment's thread
view the rest of the comments
[-] Rick_C137@programming.dev 1 points 2 years ago

Thanks all for your input.

My only workaround was to check programmatically all those input and set them with a setCustomValidity()

Too bad there isn't a method to relaunch the validity across all the page :/

Cheers

this post was submitted on 27 Jan 2024
7 points (100.0% liked)

JavaScript

2786 readers
1 users here now

founded 3 years ago
MODERATORS