Showing posts with label Credit Card Validation Library for Javascript. Show all posts
Showing posts with label Credit Card Validation Library for Javascript. Show all posts

Monday, March 28, 2011

Credit Card Validation Library for Javascript

CreditCard.js is a credit card validation library for JavaScript using Prototype. Using CreditCard.validate(’1111 2222 3333 4444′) returns true/false, the given string is automatically stripped of whitespace, so it can be plugged directly into form validations.

It checks if the luhn validation code add up, and the range and the length of the numbers. You can do the card identification via CreditCard.type(string) returns “Visa”, “MasterCard”, etc.



information is shared by www.ideasroad.com