Ich habe erfolgreich eine Passwort-Validierung implementiert. Allerdings würde Ich magExtJS - Passwort/Passwort bestätigen Javascript
Ext.apply(Ext.form.VTypes, {
password: function (val, field) {
if (field.initialPassField) {
var pwd = Ext.getCmp(field.initialPassField);
return (val == pwd.getValue());
}
return true;
},
passwordText: 'Passwords do not match'
});
{
xtype: 'textfield',
name: 'newPassword',
id: 'newPassword',
fieldLabel: 'New Password'
},
{
xtype: 'textfield',
fieldLabel: 'Confirm Password',
vtype: 'password',
name: 'confirm_pw',
initialPassField: 'newPassword' // id of the initial password field
}
Wenn es jedoch geltend macht, will ich nicht bestätigen Passwort in die Anfrage-Payload zu gehen, weil es nicht am anderen Ende definiert. Ich möchte es entweder mit einem Passwort zusammengeführt haben, wenn es gültig ist, oder gelöscht werden, wenn es gültig ist, damit die Anfrage nur ein neues Passwort akzeptiert.
Irgendwelche Hilfe?