Functiondojox.validate.isValidCreditCardNumber

dojo.require("dojox.validate.creditCard");
defined in dojox/validate/creditCard.js

checks if value matches the pattern for that card or any card types if none is specified

Usage

function (/*String|Integer*/ value, /*String?*/ ccType) (view source)
parametertypedescription
valueString|IntegerBoolean CC #, white spaces and dashes are ignored
ccTypeStringOptional. one of the values in cardinfo -- if Omitted it it returns a | delimited string of matching card types, or false if no matches found