My question is about validation in html. At the moment, if I input 100 or 1000 it will work as intended.
This is my html code:
<tr>
<th scope="row" colspan = "1"><font size="5">Number of Guests:</th>
<td colspan = "2"><input type = "text" name = "guest" maxlength = "4" id="guest"
pattern="[0-9]{3,4}" title = "Number of guests must be more than 100 people."></td>
</tr>
My problem is that when I try to input 001 or 000 it still works. How can I counter that problem? Do I have to validate in php? Thank you for any comments or suggestions.
<input type = "number" name = "guest" min = "100" max="1000" id="guest" title = "Number of guests must be more than 100 people.">inputtype field use this CSSinput[type=number]::-webkit-inner-spin-button, input[type=number]::-webkit-outer-spin-button { -webkit-appearance: none; -moz-appearance: none; appearance: none; margin: 0; }