Credit card validation extension for jQuery Validation plugin (Scripts) Publisher's description
from Jack Killpatrick
Here\'s an improved credit card validation extension for the jQuery Validation plugin.
Here's an improved credit card validation extension for the jQuery Validation plugin. This lets you pass the credit card type into the validation routine, which allows it to do card type specific checks for prefix of the card number and number of digits. This extension includes the mod-10 check (based on the Luhn Algorithm) that is used in the core creditcard validation routine. As an extra bonus, it will ignore spaces and dashes in the card number. This code was ported from this credit card validation routine by John Gardner, with some minor tweaks and additions.
The examples below show credit card validation results using the 'creditcard' validation method that comes with the jQuery Validation plugin and results using the creditcard2 validation method. The first set of tests show card numbers that pass, but should not. The second set of tests show results using the creditcard2 validation extension. Try other card numbers, too (tab out of the box to fire the validation). Try entering a valid number for one card type, then change the selected card type.
System Requirements:No special requirements.
Program Release Status: Major Update
Program Install Support: Install and Uninstall