I am trying to achieve user can only enter 10 numbers in input, also if the user put let's say 5 numbers that are also not allowed, so min and max should be 10.
<input type="number" min="10" max="10" >
Can anybody try to help me with this?
I am trying to achieve user can only enter 10 numbers in input, also if the user put let's say 5 numbers that are also not allowed, so min and max should be 10.
<input type="number" min="10" max="10" >
Can anybody try to help me with this?
minlength
and maxlength
attributes don't exist. Instead, use min
and max
.
I understand you want a 10 digits input only, so you should be doing:
<input type="number" min="1000000000" max="9999999999">