bhrott / react-native-masked-text

A pure javascript masked text and input text component for React-Native.
MIT License
1.6k stars 251 forks source link

Support up to 18 and 19 digit credit cards #154

Open lcastillo-evc opened 5 years ago

lcastillo-evc commented 5 years ago

Many of the major credit card carriers are moving or have moved to cards with up to 18 and 19 digits. Are you planning to add support for this any time soon?

Carrier Affected | # of Digits China UnionPay | 16 - 19 Discover Card | 16 or 19 Maestro | 16 - 19 Visa | 16, 18 or 19 JCB | 16 - 19

bhrott commented 5 years ago

Hey, @lcastillo88 I didn't know about that. Thanks for reporting.

AleksandrZhukov commented 5 years ago

@lcastillo88 can you show some proofs about this, eg about visa? I tried to google something but didn't find anything 😞

AleksandrZhukov commented 5 years ago

I've found this useful article - https://baymard.com/checkout-usability/credit-card-patterns

AleksandrZhukov commented 5 years ago

@benhurott Pls check the PR https://github.com/benhurott/react-native-masked-text/pull/164, I'm not sure about some pieces, will nice if you can make a code review :wink:

lcastillo-evc commented 5 years ago

Hi @AleksandrZhukov thanks for finding an article about this. The truth of the matter is that I'm not quite sure when this new card length standard will be adopted but it would be nice to have this project support it when it does.

AleksandrZhukov commented 5 years ago

There is a nice lib that describes card standards - https://github.com/braintree/credit-card-type, I think will be nice to report new details or issues there