my target is to accept only divisible by 5. When I type 6 and it is not divisible by 5, produce an alert error "This number is invalid". How can I make it work? My current work is when it's not divisible by 5, the input type number gets red.
:invalid {
background: red;
}
<input type="number" min="0" max="9000" step="5" />