mirror of
https://github.com/element-hq/element-web
synced 2024-11-27 19:56:47 +03:00
Wait until password confirm is non-empty
If password confirm is empty on blur, there's no reason to try validating it. The user may just be tabbing through fields.
This commit is contained in:
parent
27abd7d507
commit
acae2e9976
1 changed files with 8 additions and 4 deletions
|
@ -206,10 +206,14 @@ module.exports = React.createClass({
|
|||
}
|
||||
break;
|
||||
case FIELD_PASSWORD_CONFIRM:
|
||||
this.markFieldValid(
|
||||
fieldID, pwd1 == pwd2,
|
||||
"RegistrationForm.ERR_PASSWORD_MISMATCH",
|
||||
);
|
||||
if (allowEmpty && pwd2 === "") {
|
||||
this.markFieldValid(fieldID, true);
|
||||
} else {
|
||||
this.markFieldValid(
|
||||
fieldID, pwd1 == pwd2,
|
||||
"RegistrationForm.ERR_PASSWORD_MISMATCH",
|
||||
);
|
||||
}
|
||||
break;
|
||||
}
|
||||
},
|
||||
|
|
Loading…
Reference in a new issue