I like to have an input with maximum 3 characters. In Firefox everything works fine I can only write 3 numbers inside the input - but in safari you can write a lot of number
You can not use maxlength and minlength function with input type=”number”
Instead one can use regexp to solve this problem
(?=.*[0-9]) - must contain only digit
{10,10} - min length and max length must be 10. You can change these values
<input type="number" pattern="(?=.*[0-9]).{10,10}" />
Use
pattern="(?=.*[0-9]).{10,10}"
You may try to user type="text" and oninput as below. This will let the numbers only.
<input type="text" maxlength="3" oninput="this.value=this.value.replace(/[^0-9]/g,'');" id="myId"/>