Use the following code to create a basic inputEx PasswordField.
new Y.inputEx.PasswordField({parentEl: 'container1', showMsg: true});
The confirm option makes sure there is no typo in new passwords. Use it in combination with an id set on the password field to compare with.
// Using the json instanciation method :
inputEx({
type: 'group',
fields: [
{type: 'password', label: 'New password', showMsg: true, required: true, id: 'firstPassword' },
{type: 'password', label: 'Confirmation', showMsg: true, required: true, confirm: 'firstPassword' }
],
parentEl: 'container2'
});
Set the minimum password length using the minLength option :
new Y.inputEx.PasswordField({parentEl: 'container3', showMsg: true, minLength: 10});
A widget indicating the strength of the password (useful for password creation) :
new Y.inputEx.PasswordField({parentEl: 'container4', showMsg: true, strengthIndicator: true});
Display a warning if the caps lock key is on
new Y.inputEx.PasswordField({parentEl: 'container5', showMsg: true, capsLockWarning: true});