WebAppers

/ best free open source web resources /

Shopify

Credit Card Validation Library for Javascript

Posted · Category: Forms, License Free

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.

credit-card-validation

Requirements: Prototype Framework
Demo: https://github.com/madrobby/creditcard_js
License: License Free

3 Comments
  • http://jobberies.com Yaya

    is this feasible for me to implement in malaysia

  • Cassy

    A jQuery version would be great.

  • http://www.hepsiparis.com Snowbird

    prototype is almost dead. jQuery version would be usefull
    thanks

Supported By

Deals

Web Browsers Icon Set
Food Icon Set
Flat Icon Set

Flat Icon Set

100 icons