morbidick / stripe-elements

Stripe Web Components
10 stars 3 forks source link

Month and year fields allow more than 2 digits #4

Closed lpellegr closed 7 years ago

lpellegr commented 7 years ago

@morbidick The length limit is not applied because of a typo in the paper-input attribute: maxlenght instead of maxlength and the type which could be set to string:

type="text" pattern="[0-9]*" maxlength="2"

morbidick commented 7 years ago

oh a typo, thx. I think type=tel like we use for the card number would be better since it opens the right keyboard on mobile.