inputEx-library

inputEx  0.7.1

inputEx-library > inputEx > inputEx.PasswordField
Search:
 
Filters

Class inputEx.PasswordField - extends inputEx.StringField

Create a password field.

Constructor

inputEx.PasswordField ( options )
Parameters:
options <Object> inputEx.Field options object
  • confirmPasswordField: the PasswordField instance to compare to when using 2 password fields for password creation (please use the setConfirmationField method)
  • strengthIndicator: display a widget to indicate password strength (default false)
  • capsLockWarning: display a warning if CapsLock is on (default false)
  • confirm: id of the field to compare to

Properties

byId - object

Keep track of all instances, indexed by ids, for the password confirmation field

Properties inherited from inputEx.Field:

Methods

getPasswordStrength

void getPasswordStrength ( )
Return an integer within [0,100] that quantify the password strength Function taken from Mozilla Code: (changed a little bit the values) http://lxr.mozilla.org/seamonkey/source/security/manager/pki/resources/content/password.js

getStateString

void getStateString ( )
Change the state string

onInput

void onInput ( e )
Update the state of the confirmation field
Parameters:
e <Event> The original input event

onKeyPress

void onKeyPress ( )
callback to display the capsLockWarning

onKeyUp

void onKeyUp ( )
onkeyup callback to update the strength indicator

renderComponent

void renderComponent ( )
Set the el type to 'password'

setCapsLockWarning

void setCapsLockWarning ( )
Show or hide the caps lock warning given the status

setConfirmationField

void setConfirmationField ( passwordField )
Set this field as the confirmation for the targeted password field:
Parameters:
passwordField <inputEx.PasswordField> The target password field

setOptions

void setOptions ( options )
Add the password regexp, strengthIndicator, capsLockWarning
Parameters:
options <Object> Options object as passed to the constructor

updateStrengthIndicator

void updateStrengthIndicator ( )
Update the strength indicator (called by onKeyPress)

validate

void validate ( )
The validation adds the confirmation password field support

Events inherited from inputEx.Field:


Copyright © 2011 Eric Abouaf All rights reserved.