You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Given the logic below where the try to update the maxLength depending on the number passed, I don't think it's necessary to set the maxLength to 19 if it is in preview mode.
I did some tests locally with 16, 19 digit cards as well the Diners type mentioned in issue #70 and it appears to solve our issues.
@gilbarbara what do you think? Any edge cases that you can think of?
Actually the task is to handle formatting with these cards and not exactly detect the maxLength.
MaxLenght is just a safeguard to avoid breaking the UI.
This is what I noticed locally while testing with the number provided in issue #70 (preview mode - Diners card w/ 14 digits): (notice the extra bullet at the end of the number)
That's why I thought we would need to update maxLength for this case.
It should work with Amex, Diners, 16, and 19 characters.
The text was updated successfully, but these errors were encountered: