rem: dojo.validate.isValidCreditCardNumber = function(value,ccType) {    
add: dojo.validate.isValidCreditCardNumber = function(/*String|Int*/value,/*String?*/ccType) {        
context: dojo.validate.isValidCreditCardNumber = function(value,ccType) {	//only checks if the # matches the pattern for that card or any card types if none is specified	//value == CC #, white spaces and dashes are ignored	//ccType is of the values in cardinfo -- if Omitted it it returns a | delimited string of matching card types, or false if no matches found	if(typeof value!='string'){		value = String(value);	}	value = value.replace(/[- ]/g,''); //ignore dashes and whitespaces	/* 	FIXME: not sure on all the abbreviations for credit cards,below is what each stands for atleast to my knowledge		mc: Mastercard		ec: Eurocard		vi: Visa		ax: American Express		dc: Diners Club		bl: Carte Blanch		di: Discover		jcb: JCB		er: Enroute	 */	var results=[];	var cardinfo = {		'mc':'5[1-5][0-9]{14}','ec':'5[1-5][0-9]{14}','vi':'4([0-9]{12}|[0-9]{15})',		'ax':'3[47][0-9]{13}', 'dc':'3(0[0-5][0-9]{11}|[68][0-9]{12})',		'bl':'3(0[0-5][0-9]{11}|[68][0-9]{12})','di':'6011[0-9]{12}',		'jcb':'(3[0-9]{15}|(2131|1800)[0-9]{11})','er':'2(014|149)[0-9]{11}'	};	if(ccType&&dojo.lang.has(cardinfo,ccType.toLowerCase())){		return Boolean(value.match(cardinfo[ccType.toLowerCase()])); // boolean	}else{		for(var p in cardinfo){			if(value.match('^'+cardinfo[p]+'$')!=null){				results.push(p);			}		}		return (results.length)?results.join('|'):false; // string | boolean	}	}
meta: 4707	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4707/50c3492c4c3c825dbd3401e134a19ed46799c456/creditCard.js/clean/www/resources/dojo-ajax/src/validate/creditCard.js