C problems validating a credit card chris pine dating
The solution is of course obvious: format the expiration date values the same way they are formatted on the card. When benchmarking the top 100 e-commerce sites in the US we found that 40% formatted the expiration date fields in ways that doesn’t match the majority of credit cards out there.
Luckily, that also means 60% had chosen one of the two optimal ways of formatting the expiration date fields.
In section 6.2, the standard specifies MM/YY or MM-YY as the correct way to emboss the expiration date on credit cards.
Before a credit card is submitted to a financial institution, it generally makes sense to run some simple reality checks on the number.
If the included checksum matches the calculated checksum, then the number is valid.
Most credit cards and many government identification numbers use the algorithm as a simple method of distinguishing valid numbers from mistyped or otherwise incorrect numbers.