on-internet
← Community

Set number of characters for html input

Stack Overflow ·

This is my current markup: <input type="text" id="cardnum" name="cardnum" placeholder="1234567800001234" inputmode="numeric" pattern="\[0-9\]" maxlength="16" minlength="16" {16} required\> I want the input to be numerical with 16 digits, like a card, but I keep getting this error:

Comments

Sign in or sign up to comment and upvote.

No comments yet.