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?
patternaccepts regexes, how about justpattern="\d{3}"?{3}criteria. Your regex accepts digits of length 0, 1, 2 or 3.\d{1,3}to accept digits of length 1-3.