-
Notifications
You must be signed in to change notification settings - Fork 27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Visa card question #46
Comments
One other example, if the validation for CVC includes the card type in the validation ("amex MUST be 4 only") then it should also mean that if the card type cant be determined then the CVC could be 3 or 4. I could be wrong, but just thinking through it, edge cases like this I am wondering how they are handled. |
The card type/validation is determined by the patterns listed here: https://github.com/wuori/vue-credit-card-validation/blob/master/src/cards.js. I believe if a number does NOT match any of these brands it will be considered invalid even though it could still be a legitimate card number. I will augment the documentation to point this out. If I recall correctly, the CVC validation, in its current state, always allows 3-4 numbers and doesn't change depending on card type. |
Is there any possibility of making Otherwise your library will be at the mercy of the hundreds of card edge cases that will make people unable to use their card. Its been 2 years since I worked on that project but I remember once I started looking through millions of orders, there were so many weird ones, including card BINs and pattern changes that changed every few months |
@9mm Yeah I think an "unknown" option might be the best way to go. |
I haven't looked through this library much, but another project I dealt with handled millions of payments, and there were some very weird card numbers that came through. Most notably of these would be BRAND NEW changes to a cards number scheme (like "all cards starting with '4' are visa" etc).
For your library, is this ^ function taken into account in validating VALID/INVALID, or, is it only used to determine the card SVG logo?
I ask because calling someones valid credit card number invalid would be the worst thing to happen, however, IF the card can't be determined by your library (because the rule is new), its shown as valid, but the card logo is just blank or something, that would be the idea scenario.
In other words, if the ONLY factor in determining if a card number is valid is Luhn, and not the fact that the number doesnt fit any of your existing schemes for "what makes a card a Visa" then I think were OK
The text was updated successfully, but these errors were encountered: