Help to how use :invalid in CSS
I need that only change the style of the input, but it's awalys apply the style when use :invalid
How can i prevent this doesn't happending?
excuse me. My english isn't too good
I'm from Colombia
4 Replies
:user-invalid
🙂
Only problem is browser support isn't fantastic yet. https://caniuse.com/?search=%3Auser-invalidSo.. could i use not the :invalid?
:invalid
works, but like you can see, that will come in even if the user hasn't interacted with it. There is nothing we can do to change that (without using JavaScript). That's why they added :user-invalid
, this only checks the validation after the user has interacted with the element.Thanks 🥰. You are of the best