Text Input Validation & Error without JavaScript
Vanilla CSS:
input.nameValidation + label::after
{
content: "Only alphabets and quotes allowed";
color: orange;
}
input.nameValidation:focus:required:invalid:not(:placeholder-shown)
{
border: 1px solid red;
animation: shake 300ms;
}
...
css.co.in2 min read