3lvis / FormTextField

UITextField with support for formatters and input validators
Other
186 stars 41 forks source link

American Express cards are invalid #44

Open anthonycastelli opened 5 years ago

anthonycastelli commented 5 years ago

A typical credit card number (i.e. Mastercard) looks like this: 5555 5555 5555 4444 and an American Express card looks like 3782 822463 10005

Using the Default CardNumberFormatter, American Express cards are invalid. Can we get some sort of formatter that can be used with both?

3lvis commented 5 years ago

Hi @anthonycastelli!

Should be possible to have an algorithm that supports all types.

https://ux.stackexchange.com/questions/51346/why-do-credit-card-forms-ask-for-visa-mastercard-etc