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; }
@jhey.dev I have read somewhere how to create custom validation messages of form fields without js. Do you have a reference at hand?
6 reposts163 likes