I would like to force the user to enter their age. I would also like to make sure that they only come in between 18-99. Is this possible with HTML5 attributes like required , pattern , min and max ? It looks like it is not working
<form> <input type="number" name="Q2age" id="Q2age" size="10" min="18" max="99" pattern="[1-8][0-9]" required> <button type="submit" class="button" id="test">Submit</button> </form>
Am I doing something wrong here? I am using Firefox 22.0 on Ubuntu 12.0.4LTS (also tested on Chrome but not working.) Thank you for your help.
html css html5
user1330974
source share