html 5 input only 10 digits code example
Example: html input only 4 digits
<input type="text" name="pincode" maxlength="4" id="pin" pattern="^0[1-9]|[1-9]\d$" required/>
<input type="text" name="pincode" maxlength="4" id="pin" pattern="^0[1-9]|[1-9]\d$" required/>