Reputation: 946
Is it possible to make some kind of pattern matching with html5 to only allow 3-digit numbers to a text form. I do not want the input type to be number because I dont like the visual design of it.
The closest I get is pattern=".{0.3}"
But that accepts all kind of text input - not limited to numbers.
<input type="text" name="price" id="price" pattern="fancy code here">
Question: Can you make a pattern in input type="text" that accepts only integers in the max length of 3?
Upvotes: 2
Views: 281