Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

jquery-creditcardvalidator

Package Overview
Dependencies
Maintainers
2
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

jquery-creditcardvalidator

Detect and validate credit card numbers.

  • 1.2.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
895
decreased by-17.36%
Maintainers
2
Weekly downloads
 
Created
Source

jQuery Credit Card Validator

jQuery Credit Card Validator detects and validates credit card numbers. It’ll tell you the detected credit card type and whether the number length and Luhn checksum are valid for the type of card.

Installation

NPM

npm i jquery-creditcardvalidator

Download

Download the latest jquery.creditCardValidator.js.

The latest stable version is always in the master branch. If you need previous versions, you’ll find them on the releases page.

Do not use any branches other than master. Branches starting with release/ are development branches and they will most likely be broken.

How to use

Run validation every time a field value changes:

$('#cc_number').validateCreditCard(function(result) {
    if (result.valid) {
        $(this).addClass('cc-valid');
    } else {
        $(this).removeClass('cc-valid');
    }
});

Run validation once:

const result = $('#cc_number').validateCreditCard();

if (result.valid) {
    $(this).addClass('cc-valid');
} else {
    $(this).removeClass('cc-valid');
}

Documentation

For full documentation see the jQuery Credit Card Validator website.

Keywords

FAQs

Package last updated on 18 Nov 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc