Skip to content

Releases: PawelDecowski/jquery-creditcardvalidator

1.2

18 Nov 08:46
Compare
Choose a tag to compare

New features

  • Added support for MIR cards
  • Updated IIN ranges: Diners Club International, JCB
  • Updated valid lengths: Diners Club Carte Blanche, Diners Club International, JCB, Discover
  • Validate Luhn even if the card number doesn’t match any known cards.
    luhn_valid is now true if the Luhn checksum is correct, even if the card number is not recognised.

Other

  • Switched build system from CodeKit to Gulp
  • Published to NPM
  • Added basic instructions to README.md

1.1

29 Nov 20:17
Compare
Choose a tag to compare
1.1

New features

  • Changed number matching engine from regex to trie-backed ranges
  • New card brands: Dankort, UATP
  • Updated NIN ranges: Maestro, MasterCard
  • Allow VISA lengths between 13 and 19 digits

1.0

09 Sep 13:39
Compare
Choose a tag to compare
1.0

Breaking changes

  • Minimum required version of jQuery is now 1.7. This is because the events are now attached using .on instead of .bind. The former is not available in jQuery prior to 1.7.

New features

  • Unit tests — thanks to James Allardice.

  • Binding is now optional — thanks to Tanner M Young.

    .validateCreditCard( [options] )

    Called on an input field validates the number and returns a result object.

  • Ability to pass an array of accepted credit cards — thanks to gabrieljoelc.

    $('#cc_number').validateCreditCard({ accept: ['visa', 'mastercard'] })
  • this variable in the context of callback refers to the input element the validation is bound to.

    $('#cc_number').validateCreditCard(function() { console.log(this.val()) })

    The code above will log the value of the credit card number field to the console every time the value changes.

  • The result object now includes a valid property which is a shorthand for length_valid && luhn_valid

  • The library is now in Bower.

Bug fixes

  • Events are now namespaced. This prevents accidental unbinding of events attached by other plugins.

Other changes

  • Added a basic example of usage (in the example directory).

  • Redesigned demo page — thanks to Relish.

  • MIT licence.

    It’s much clearer than any other licences. It means you can use jQuery CC Validator in any way you want as long as you include the copyright notice and licence text (found at the top of the source file).