I have the following markup where the user enters a PIN number. I am attempting to do something really basic to limit the user to 4 digits only.
This solution works fine in desktop browsers, however on mobiles (and spoofing mobile in a desktop browser) in my jQuery Mobile application there is no restriction and it is possible to enter more than 4 digits.
<input type="number" max="9999" min="1" maxlength="4" autocomplete="off" value="" class="tiny pin_number textbox" required="" name="payments[1872][pin]" pattern="\d+">
I have tried with and without the min
and max
attributes.
I am using a customised version of jQM v1.3.1