Closed crookedneighbor closed 6 years ago
Thanks to ELO, the regex checking was getting ridiculously complicated. (and causing unexpected failures in card-validator https://github.com/braintree/card-validator/issues/64)
Instead, we can loop over bin patterns and eliminate redundancies by checking for a best match once the card number is long enough to determine the type conclusively (usually after 6 digits have been entered).
Correct, it is a major version bump. If we didn't allow people to add their own card types, it'd just be a minor version bump.
Thanks to ELO, the regex checking was getting ridiculously complicated. (and causing unexpected failures in card-validator https://github.com/braintree/card-validator/issues/64)
Instead, we can loop over bin patterns and eliminate redundancies by checking for a best match once the card number is long enough to determine the type conclusively (usually after 6 digits have been entered).