HTML 5 - number regular expression
Use [0-9]{1,5}
<input type="text" pattern="[0-9]{1,5}" />
{1,5}
means repeat the previous part 1, 2, 3, ..., 5 times.
This is the cleanest way
<input type="text" pattern="\d{1,5}" title="Only digits" />
Use [0-9]{1,5}
<input type="text" pattern="[0-9]{1,5}" />
{1,5}
means repeat the previous part 1, 2, 3, ..., 5 times.
This is the cleanest way
<input type="text" pattern="\d{1,5}" title="Only digits" />