Credit Card Validation Solution
A set of open source scripts that ensure credit card information is keyed in correctly. Checks numbers for length, falling within accepted ranges, the Mod 10 / Luhn checksum and that you accept the given type. Tells type based on the number. Expiration date validation is optional. Error messages are internationalized. New languages can be easily added. Works for American Express, Australian BankCard, Carte Blanche, Diners Club, Discover/Novus, JCB, MasterCard and Visa.