Opened 11 years ago

Closed 11 years ago

Last modified 10 years ago

#1463 closed enhancement (fixed)

credit card validation routines

Reported by: tk Owned by: dylan
Priority: high Milestone:
Component: General Version: 0.3
Keywords: validate credit card creditcard Cc: ktiedt@…
Blocked by: Blocking:


Provides the following functions dojo.validate.creditCard.isValidCreditCard(value,ccType) dojo.validate.creditCard.isValidCreditCardNumber(value,ccType) dojo.validate.creditCard.isValidCvv(value,ccType) dojo.validate.isValidLuhn(value);

isValidCreditCard: compares value and ccType against Luhn alogrithm and isValidCreditCardNumber, true if both are true - false otherwise

isValidCreditCardNumber: matches the value against the predfined rules for that card type (if supplied) otherwise it returns the matching card types (delimited by '|' if more than one matches)

isValidCvv: makes sure that the submitted 'security code' is of the appropriate length and format

isValidLuhn: validates the provided number against the Luhn algorithm (used for more than just credit cards, hence why it is in common.js


Attachments (1)

dojo.validate.creditCard.diff (3.6 KB) - added by tk 11 years ago.
update to validates common.js and adds new creditCard.js

Download all attachments as: .zip

Change History (4)

Changed 11 years ago by tk

update to validates common.js and adds new creditCard.js

comment:1 Changed 11 years ago by dylan

(In [5726]) add initial credit card validation support, references #1463

comment:2 Changed 11 years ago by dylan

  • Resolution set to fixed
  • Status changed from new to closed

(In [5729]) fixes #1463, credit card validation for dojo

comment:3 Changed 10 years ago by anonymous

  • Milestone 0.4 deleted

Milestone 0.4 deleted

Note: See TracTickets for help on using tickets.