a:10:{s:9:"#provides";s:25:"dojox.validate.creditCard";s:9:"#resource";s:22:"validate/creditCard.js";s:9:"#requires";a:1:{i:0;a:2:{i:0;s:6:"common";i:1;s:20:"dojox.validate._base";}}s:25:"dojox.validate.creditCard";a:2:{s:4:"type";s:6:"Object";s:7:"summary";s:158:"Module provides validation functions for Credit Cards, using account number rules in conjunction with the Luhn algorigthm, with a plugable card info database.";}s:24:"dojox.validate._cardInfo";a:5:{s:4:"type";s:6:"Object";s:7:"summary";s:46:"A dictionary list of credit card abbreviations";s:11:"description";s:182:"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";s:8:"examples";a:1:{i:0;s:143:"Define your own card, gift-card, whatever. Starts with 7, is 15 total length. dojo.mixin(dojox.validate._cardInfo, { "my":"7[0-9]{14}" });";}s:7:"private";b:1;}s:32:"dojox.validate.isValidCreditCard";a:6:{s:4:"type";s:8:"Function";s:10:"parameters";a:2:{s:5:"value";a:2:{s:4:"type";s:10:"String|Int";s:7:"summary";s:40:"A Value (credit card number) to validate";}s:6:"ccType";a:2:{s:4:"type";s:6:"String";s:7:"summary";s:27:"A credit-card abbreviation.";}}s:6:"source";s:163:" return ((ccType.toLowerCase() == 'er' || dojox.validate.isValidLuhn(value)) && dojox.validate.isValidCreditCardNumber(value, ccType.toLowerCase())); // Boolean";s:7:"summary";s:57:"Validate a credit card number by type with Luhn checking.";s:11:"description";s:212:"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.";s:8:"examples";a:1:{i:0;s:90:" if(dojox.validate.isValidCreditCard("12345", "mc")){ console.log('inconceivable'); }";}}s:38:"dojox.validate.isValidCreditCardNumber";a:5:{s:4:"type";s:8:"Function";s:10:"parameters";a:2:{s:5:"value";a:2:{s:4:"type";s:10:"String|Int";s:7:"summary";s:41:"CC #, white spaces and dashes are ignored";}s:6:"ccType";a:3:{s:4:"type";s:6:"String";s:8:"optional";b:1;s:7:"summary";s:169:"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.";}}s:6:"source";s:420:" value = String(value).replace(/[- ]/g,''); //ignore dashes and whitespaces var cardinfo = dojox.validate._cardInfo, results = []; if(ccType){ var expr = cardinfo[ccType.toLowerCase()]; return expr ? !!value.match(expr) : false; // boolean } for(var p in cardinfo){ if(value.match('^' + cardinfo[p] + '$')){ results.push(p); } } return results.length ? results.join('|') : false; // String | boolean";s:7:"summary";s:88:"Checks if value matches the pattern for that card or any card types if none is specified";s:7:"returns";s:24:"boolean|String | boolean";}s:25:"dojox.validate.isValidCvv";a:6:{s:4:"type";s:8:"Function";s:10:"parameters";a:2:{s:5:"value";a:1:{s:4:"type";s:10:"String|Int";}s:6:"ccType";a:1:{s:4:"type";s:6:"String";}}s:6:"source";s:335:" if(!dojo.isString(value)){ value = String(value); } var format; switch (ccType.toLowerCase()){ case 'mc': case 'ec': case 'vi': case 'di': format = '###'; break; case 'ax': format = '####'; break; } return !!format && value.length && dojox.validate.isNumberFormat(value, { format: format }); // Boolean";s:7:"summary";s:63:"Validate the security code (CCV) for a passed credit-card type.";s:11:"description";s:0:"";s:7:"returns";s:7:"Boolean";}s:14:"dojox.validate";a:2:{s:4:"type";s:6:"Object";s:7:"summary";s:0:"";}s:5:"dojox";a:2:{s:4:"type";s:6:"Object";s:7:"summary";s:0:"";}}