Open this example in the interactive library
Source code
<style>
.demo:out-of-range {
outline: 2px solid #be123c;
}
</style>
<label
>Quantity, 1–5 <input class="demo" type="number" min="1" max="5" value="8"
/></label>
Mark a field that is outside numeric bounds with native CSS. The preview includes a small shared demo stylesheet.
Open this example in the interactive library
<style>
.demo:out-of-range {
outline: 2px solid #be123c;
}
</style>
<label
>Quantity, 1–5 <input class="demo" type="number" min="1" max="5" value="8"
/></label>