I want to restrict the input type="number" with 10 digits but it doesn't accept as I have set maxlength to input type="text". Is there any another way rather than use regex to set maximum length to type="number"?. Is there any another option available (same as input type="text" maxlength="10"), to set length for number easily?
Asked
Active
Viewed 6,711 times
3
-
Why not use `max` attribute for number typed inputs? – Trash Can Dec 12 '18 at 06:59
-
1Possible duplicate of [maxlength ignored for input type="number" in Chrome](https://stackoverflow.com/questions/18510845/maxlength-ignored-for-input-type-number-in-chrome) – Prashant Pimpale Dec 12 '18 at 07:02