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/form/PasswordValidator.js

  • Provides:

    • dojox.form.PasswordValidator
  • Requires:

    • dijit.form._FormWidget in common
    • dijit.form.ValidationTextBox in common
  • dojox.form._ChildTextBox

    • type
      Function
    • chains:
      • dijit.form.ValidationTextBox: (prototype)
      • dijit.form.ValidationTextBox: (call)
    • summary
      A class that is shared between all our children - extends
      ValidationTextBox and provides some shared functionality
  • dojox.form._ChildTextBox.containerWidget

    • type
      widget
    • summary
      Our parent (the PasswordValidator)
  • dojox.form._ChildTextBox.type

    • type
      string
    • summary
      Don't override this - we are all "password" types
  • dojox.form._ChildTextBox.reset

    • summary
      Force-set to empty string (we don't save passwords EVER)...and
      since _OldPWBox overrides _setValueAttr to check for empty string,
      call our parent class directly (not this.inherited())
    • type
      Function
  • dojox.form._ChildTextBox._hasBeenBlurred

    • type
      bool
  • dojox.form._ChildTextBox.postCreate

    • summary
      We want to remove the "name" attribute from our focus node if
      we don't have one set - this prevents all our extra values
      from being posted on submit
    • type
      Function
  • dojox.form._ChildTextBox._onChildKeyPress

    • parameters:
      • e
    • type
      Function
  • dojox.form._OldPWBox

    • type
      Function
    • chains:
      • dojox.form._ChildTextBox: (prototype)
      • dojox.form._ChildTextBox: (call)
    • summary
      A class representing our "old password" box.
  • dojox.form._OldPWBox._isPWValid

    • type
      boolean
    • summary
      Whether or not the password is valid
  • dojox.form._OldPWBox._setValueAttr

    • parameters:
      • newVal: (typeof anything)
      • priority: (typeof boolean)
    • summary
      Updates _isPWValid if this isn't our initial update by calling
      our PasswordValidator's pwCheck function
    • type
      Function
  • dojox.form._OldPWBox.isValid

    • parameters:
      • isFocused: (typeof boolean)
    • type
      Function
  • dojox.form._OldPWBox._update

    • parameters:
      • e: (typeof event)
    • type
      Function
  • dojox.form._OldPWBox._getValueAttr

    • type
      Function
  • dojox.form._OldPWBox._setBlurValue

    • type
      Function
  • dojox.form._NewPWBox

    • type
      Function
    • chains:
      • dojox.form._ChildTextBox: (prototype)
      • dojox.form._ChildTextBox: (call)
    • summary
      A class representing our new password textbox
  • dojox.form._NewPWBox.required

    • type
      boolean
    • summary
      Whether or not this widget is required (default: true)
  • dojox.form._NewPWBox.onChange

    • summary
      Validates our verify box - to make sure that a change to me is
      reflected there
    • type
      Function
  • dojox.form._VerifyPWBox

    • type
      Function
    • chains:
      • dojox.form._ChildTextBox: (prototype)
      • dojox.form._ChildTextBox: (call)
    • summary
      A class representing our verify textbox
  • dojox.form._VerifyPWBox.isValid

    • parameters:
      • isFocused
    • summary
      Validates that we match the "real" password
    • type
      Function
  • dojox.form.PasswordValidator

    • type
      Function
    • chains:
      • dijit.form._FormValueWidget: (prototype)
      • dijit.form._FormValueWidget: (call)
    • summary
      A password validation widget that simplifies the "old/new/verify"
      style of requesting passwords.  You will probably want to override
      this class and implement your own pwCheck function.
  • dojox.form.PasswordValidator.required

    • type
      boolean
    • summary
      Whether or not it is required for form submission
  • dojox.form.PasswordValidator._inputWidgets

    • type
      Array
  • dojox.form.PasswordValidator.oldName

    • optional
    • type
      string
    • summary
      The name to send our old password as (when form is posted)
  • dojox.form.PasswordValidator.templateString

    • type
      Object
  • dojox.form.PasswordValidator._hasBeenBlurred

    • type
      bool
  • dojox.form.PasswordValidator.isValid

    • parameters:
      • isFocused: (typeof boolean)
    • summary
      we are valid if ALL our children are valid
    • type
      Function
  • dojox.form.PasswordValidator.validate

    • parameters:
      • isFocused: (typeof boolean)
    • summary
      Validating this widget validates all our children
    • type
      Function
  • dojox.form.PasswordValidator.reset

    • summary
      Resetting this widget resets all our children
    • type
      Function
  • dojox.form.PasswordValidator._createSubWidgets

    • summary
      Turns the inputs inside this widget into "real" validation
      widgets - and sets up the needed connections.
    • type
      Function
  • dojox.form.PasswordValidator.pwCheck

    • parameters:
      • password: (typeof string)
    • summary
      Overridable function for validation of the old password box.
      
      This function is called and passed the old password.  Return
      true if it's OK to continue, and false if it is not.
      
      IMPORTANT SECURITY NOTE:  Do NOT EVER EVER EVER check this in
      HTML or JavaScript!!!
      
      You will probably want to override this function to callback
      to a server to verify the password (the callback will need to
      be syncronous) - and it's probably a good idea to validate
      it again on form submission before actually doing
      anything destructive - that's why the "oldName" value
      is available.
      
      And don't just fetch the password from the server
      either :)  Send the test password (probably hashed, for
      security) and return from the server a status instead.
      
      Again - DON'T BE INSECURE!!!  Security is left as an exercise
      for the reader :)
    • type
      Function
  • dojox.form.PasswordValidator.postCreate

    • summary
      Sets up the correct widgets.  You *MUST* specify one child
      text box (a simple HTML <input> element) with pwType="new"
      *and* one child text box with pwType="verify".  You *MAY*
      specify a third child text box with pwType="old" in order to
      prompt the user to enter in their old password before the
      widget returns that it is valid.
    • type
      Function
  • dojox.form.PasswordValidator.containerNode

  • dojox.form.PasswordValidator._childValueAttr

    • parameters:
      • v
    • type
      Function
  • dojox.form.PasswordValidator._setDisabledAttr

    • parameters:
      • value
    • type
      Function
  • dojox.form.PasswordValidator._setRequiredAttribute

    • parameters:
      • value
    • type
      Function
  • dojox.form.PasswordValidator._setValueAttr

    • parameters:
      • v
    • type
      Function
  • dojox.form.PasswordValidator._getValueAttr

    • type
      Function
  • dojox.form.PasswordValidator.focus

    • summary
      places focus on the first invalid input widget - if all
      input widgets are valid, the first widget is focused.
    • type
      Function
  • dojox.form

    • type
      Object
  • dojox

    • type
      Object