braintree / card-validator

Validate credit cards as users type.
MIT License
893 stars 111 forks source link

Why is luhnValidateUnionPay an option? #112

Closed teebu closed 1 year ago

teebu commented 1 year ago

Why are they not checked by default?

hollabaq86 commented 1 year ago

Great question: not all UnionPay cards pass luhn validation 🙃

The trade off with this option is you'll check for luhn validity on all Union Pay cards, but as a result some Union Pay cards that are actually valid in UinionPay's eyes will come back as isValid = false.

Hope this helps!