Warning: Use of undefined constant Symbol - assumed 'Symbol' (this will throw an Error in a future version of PHP) in /mnt/new-ebs/workbench-106550/lib/dojo/util/docscripts/lib/parser2/dojo2.inc on line 215 Warning: Use of undefined constant JavaScriptSymbol - assumed 'JavaScriptSymbol' (this will throw an Error in a future version of PHP) in /mnt/new-ebs/workbench-106550/lib/dojo/util/docscripts/lib/parser2/dojo2.inc on line 215

dojox/validate/creditCard.js

  • Provides:

    • dojox.validate.creditCard
  • Requires:

    • dojox.validate._base in common
  • dojox.validate.creditCard

    • summary
      Module provides validation functions for Credit Cards, using account number
      rules in conjunction with the Luhn algorigthm, with a plugable card info database.
    • type
      Object
  • dojox.validate._cardInfo

    • summary
      A dictionary list of credit card abbreviations
    • description
      A hash of valid CC abbreviations and regular expressions
    • example
      Define your own card, gift-card, whatever. Starts with 7,
      is 15 total length.
       dojo.mixin(dojox.validate._cardInfo, {
       	"my":"7[0-9]{14}"
       });
    • alias - dojox.validate._cardInfo
    • type
      Object
  • dojox.validate._cardInfo.mc

    • type
      Mastercard
  • dojox.validate._cardInfo.ec

    • type
      Eurocard
  • dojox.validate._cardInfo.vi

    • type
      Visa
  • dojox.validate._cardInfo.ax

    • type
      American
    • summary
      Express
  • dojox.validate._cardInfo.dc

    • type
      Diners
    • summary
      Club
  • dojox.validate._cardInfo.bl

    • type
      Carte
    • summary
      Blanch
  • dojox.validate._cardInfo.di

    • type
      Discover
  • dojox.validate._cardInfo.jcb

    • type
      JCB
  • dojox.validate._cardInfo.er

    • type
      Enroute
  • dojox.validate.isValidCreditCard

    • parameters:
      • value: (typeof String|Int)
        A Value (credit card number) to validate
      • ccType: (typeof String)
        A credit-card abbreviation.
    • summary
      Validate a credit card number by type with Luhn checking.
    • description
      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.
    • example
      	if(dojox.validate.isValidCreditCard("12345", "mc")){
      		console.log('inconceivable');
      	}
    • type
      Function
  • dojox.validate.isValidCreditCardNumber

    • parameters:
      • value: (typeof String|Int)
        CC #, white spaces and dashes are ignored
      • ccType: (typeof String)
        One of the abbreviation values in <code>dojox.validate._cardInfo</code> --
        if Omitted, function returns a <code>|</code> delimited string of matching card types,
        or false if no matches found.
    • returns
      boolean|String
    • summary
      Checks if value matches the pattern for that card or any card types if none is specified
    • type
      Function
  • dojox.validate.isValidCvv

    • parameters:
      • value: (typeof String|Int)
      • ccType: (typeof String)
    • returns
      Boolean
    • summary
      Validate the security code (CCV) for a passed credit-card type.
    • type
      Function
  • dojox.validate

    • type
      Object
  • dojox

    • type
      Object