Post

you can use CSS to detect not only when a form is :valid but also when it's been interacted with s/:valid/:user-valid 🤙 .group:has(:user-invalid) { --color: var(--invalid); } input:user-invalid + .error { display: block; }

Helge Ahrens@tylopilus.bsky.social

@jhey.dev I have read somewhere how to create custom validation messages of form fields without js. Do you have a reference at hand?

Love it, thank you for this. I was blanking on user-valid. All I remembered was that invalid always checked even when the user has not interacted with it. This is what I was looking for!

was a great opportunity to take it for a spin again 🙏 last time i posted about it, it wasn't fully supported yet but now we should be good to use it freely 🚀

0 reposts0 likes

No replies yet.