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/regexp.js

  • Provides:

    • dojox.validate.regexp
  • Requires:

    • dojo.regexp in common
  • dojox.validate.regexp.ipAddress

    • parameters:
      • flags: (typeof Object)
    • returns
      String
    • summary
      Builds a RE that matches an IP Address
    • description
      Supports 5 formats for IPv4: dotted decimal, dotted hex, dotted octal, decimal and hexadecimal.
      Supports 2 formats for Ipv6.
      
      flags  An object.  All flags are boolean with default = true.
      flags.allowDottedDecimal  Example, 207.142.131.235.  No zero padding.
      flags.allowDottedHex  Example, 0x18.0x11.0x9b.0x28.  Case insensitive.  Zero padding allowed.
      flags.allowDottedOctal  Example, 0030.0021.0233.0050.  Zero padding allowed.
      flags.allowDecimal  Example, 3482223595.  A decimal number between 0-4294967295.
      flags.allowHex  Example, 0xCF8E83EB.  Hexadecimal number between 0x0-0xFFFFFFFF.
      Case insensitive.  Zero padding allowed.
      flags.allowIPv6   IPv6 address written as eight groups of four hexadecimal digits.
      FIXME: ipv6 can be written multiple ways IIRC
      flags.allowHybrid   IPv6 address written as six groups of four hexadecimal digits
      followed by the usual 4 dotted decimal digit notation of IPv4. x:x:x:x:x:x:d.d.d.d
    • type
      Function
  • dojox.validate.regexp.host

    • parameters:
      • flags: (typeof Object)
        An object.
        flags.allowNamed Allow a named host for local networks. Default is false.
        flags.allowIP  Allow an IP address for hostname.  Default is true.
        flags.allowLocal  Allow the host to be "localhost".  Default is false.
        flags.allowPort  Allow a port number to be present.  Default is true.
        flags in regexp.ipAddress can be applied.
    • returns
      String
    • summary
      Builds a RE that matches a host
    • description
      A host is a named host (A-z0-9_- but not starting with -), a domain name or an IP address, possibly followed by a port number.
    • type
      Function
  • dojox.validate.regexp.url

    • parameters:
      • flags: (typeof Object)
        An object
        flags.scheme  Can be true, false, or [true, false].
        This means: required, not allowed, or match either one.
        flags in regexp.host can be applied.
        flags in regexp.ipAddress can be applied.
    • returns
      "; } return ""; }
    • summary
      Builds a regular expression that matches a URL
    • type
      Function
  • dojox.validate.regexp.emailAddress

    • parameters:
      • flags: (typeof Object)
        An object
        flags.allowCruft  Allow address like <mailto:foo@yahoo.com>.  Default is false.
        flags in regexp.host can be applied.
        flags in regexp.ipAddress can be applied.
    • returns
      String
    • summary
      Builds a regular expression that matches an email address
    • type
      Function
  • dojox.validate.regexp.emailAddressList

    • parameters:
      • flags: (typeof Object)
        An object.
        flags.listSeparator  The character used to separate email addresses.  Default is ";", ",", "\n" or " ".
        flags in regexp.emailAddress can be applied.
        flags in regexp.host can be applied.
        flags in regexp.ipAddress can be applied.
    • returns
      String
    • summary
      Builds a regular expression that matches a list of email addresses.
    • type
      Function
  • dojox.validate.regexp.numberFormat

    • parameters:
      • flags: (typeof Object)
        An object
        flags.format  A string or an Array of strings for multiple formats.
    • returns
      String
    • summary
      Builds a regular expression to match any sort of number based format
    • description
      Use this method for phone numbers, social security numbers, zip-codes, etc.
      The RE can match one format or one of multiple formats.
      
      Format
      #        Stands for a digit, 0-9.
      ?        Stands for an optional digit, 0-9 or nothing.
      All other characters must appear literally in the expression.
      
      Example
      "(###) ###-####"       ->   (510) 542-9742
      "(###) ###-#### x#???" ->   (510) 542-9742 x153
      "###-##-####"          ->   506-82-1089       i.e. social security number
      "#####-####"           ->   98225-1649        i.e. zip code
    • type
      Function
  • dojox.validate.regexp.ca

    • type
      Object
  • dojox.validate.regexp.ca.postalCode

    • summary
      String regular Express to match Canadain Postal Codes
    • type
      Function
  • dojox.validate.regexp.ca.province

    • summary
      a regular expression to match Canadian Province Abbreviations
    • type
      Function
  • dojox.validate.regexp.us

    • type
      Object
  • dojox.validate.regexp.us.state

    • parameters:
      • flags: (typeof Object)
    • returns
      String
    • summary
      A regular expression to match US state and territory abbreviations
      
      flags  An object.
      flags.allowTerritories  Allow Guam, Puerto Rico, etc.  Default is true.
      flags.allowMilitary  Allow military 'states', e.g. Armed Forces Europe (AE).  Default is true.
    • type
      Function
  • dojox.validate.regexp

    • type
      Object
  • dojox.validate

    • type
      Object
  • dojox

    • type
      Object