Open this example in the interactive library
Source code
<style>
.demo:user-invalid {
border: 2px solid #be123c;
}
</style>
<label
>Email
<input class="demo" type="email" required placeholder="Edit, then blur"
/></label>
Highlight invalid input after editing with native CSS. The preview includes a small shared demo stylesheet.
Open this example in the interactive library
<style>
.demo:user-invalid {
border: 2px solid #be123c;
}
</style>
<label
>Email
<input class="demo" type="email" required placeholder="Edit, then blur"
/></label>