Closed webbie closed 6 years ago
This is intentional.
You'll see that in all those cases, the exactPattern
regex will take over when it reaches the end of the prefixPattern. Amex, Diner's Club.
IE, it's only intended to match the prefix of the card.
Do you see a specific case where it's wrong and is causing the card detection to be incorrect?
Ah got it.. actually, I was using these regexs for my custom validation, with full credit card numbers (that is difference, didn't realized your library takes numbers as user types them).
prefixPattern
regexps are incorrect for all card types except Visa, they have$
sign at the end of regexp:/^(3|34|37)$/
/^(3|3[0689]|30[0-5])$/
..