Closed oodavid closed 7 years ago
The directive adds maxlength="2"
, how is it possible to enter 4 characters?
Ahh, it's a mismatch - apparently maxlength
doesn't apply when type="number"
instead I guess we need min/max.
That's called out as not recommended in the docs: https://github.com/bendrucker/angular-credit-cards#cc-exp
Using the following:
<input type="number" name="myCardExpYear" ng-model="newCard.exp_year" cc-exp-year ng-required="true" placeholder="YY">
It's possible to enter "2018" as the year, which yields a value of "202018"