You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-11-20 16:22:28 +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:
@@ -206,10 +206,14 @@ module.exports = React.createClass({
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case FIELD_PASSWORD_CONFIRM:
|
case FIELD_PASSWORD_CONFIRM:
|
||||||
|
if (allowEmpty && pwd2 === "") {
|
||||||
|
this.markFieldValid(fieldID, true);
|
||||||
|
} else {
|
||||||
this.markFieldValid(
|
this.markFieldValid(
|
||||||
fieldID, pwd1 == pwd2,
|
fieldID, pwd1 == pwd2,
|
||||||
"RegistrationForm.ERR_PASSWORD_MISMATCH",
|
"RegistrationForm.ERR_PASSWORD_MISMATCH",
|
||||||
);
|
);
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user