Object
Module provides validation functions for Credit Cards, using account number rules in conjunction with the Luhn algorigthm, with a plugable card info database.
Object
A dictionary list of credit card abbreviations
A hash of valid CC abbreviations and regular expressions mc: Mastercard ec: Eurocard vi: Visa ax: American Express dc: Diners Club bl: Carte Blanch di: Discover jcb: JCB er: Enroute
Define your own card, gift-card, whatever. Starts with 7, is 15 total length. dojo.mixin(dojox.validate._cardInfo, { "my":"7[0-9]{14}" });
Function
A Value (credit card number) to validate
A credit-card abbreviation.
Validate a credit card number by type with Luhn checking.
Checks if a credit card type matches the # scheme in a passed value, and if the Luhn checksum is accurate (unless its an Enroute card, in which case the checkSum is skipped), returning a Boolean to check against.
if(dojox.validate.isValidCreditCard("12345", "mc")){ console.log('inconceivable'); }
Function
CC #, white spaces and dashes are ignored
One of the abbreviation values in `dojox.validate._cardInfo` -- if Omitted, function returns a `|` delimited string of matching card types, or false if no matches found.
Checks if value matches the pattern for that card or any card types if none is specified
boolean|String | boolean
Function
Validate the security code (CCV) for a passed credit-card type.
Boolean
Object
Object