I know we can restrict the user to enter numbers less than specific max number by below code.
<input id="txt" max="9999" type="number">
If user enters anything more than 9999 a tooltip will appear above textbox asking user to enter number less than 9999. Is there way to restrict user to enter only max 4 numbers in textbox. System will not allow numbers enter any thing in text box after 4 digits are entered.
This is working with normal texbox using below code but for numeric textbox, system allows to enter n digits.
<input id="txt" maxlength="4" type="text">
P.S. I have already done validation using Jquery, if user enters more than 4 digits, system will notify users. My requirement is user should not be allowed to enter 5th digit at all.