Form validation with only 3-digit number input

Viewed 28
<li>
    <label for="number"> TagID: <abbr title="required" aria-label="required">*</abbr></label>
    <input type="number" inputmode="numeric" min="100" max="999" id="tagid" name="tagid" pattern="[1-999]{3}" placeholder="Enter a 3-digit number (E.g. 725)"required/>
</li>

From the HTML code above, how do I incorporate javascript to ensure that the user only enters a 3-digit number specifically for form validation input?

0 Answers
Related