Opened 13 years ago

Closed 13 years ago

Last modified 12 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:

Description

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

-Karl

Attachments (1)

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

Download all attachments as: .zip

Change History (4)

Changed 13 years ago by tk

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

comment:1 Changed 13 years ago by dylan

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

comment:2 Changed 13 years ago by dylan

Resolution: fixed
Status: newclosed

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

comment:3 Changed 12 years ago by (none)

Milestone: 0.4

Milestone 0.4 deleted

Note: See TracTickets for help on using tickets.