Don't show two errors in verificationCode login page

This commit is contained in:
Yang Luo
2024-01-13 15:58:35 +08:00
parent fdb68bf9c8
commit 5bb12a30d4
2 changed files with 5 additions and 1 deletions

View File

@ -588,6 +588,10 @@ class LoginPage extends React.Component {
},
{
validator: (_, value) => {
if (value === "") {
return Promise.resolve();
}
if (this.state.loginMethod === "verificationCode") {
if (!Setting.isValidEmail(value) && !Setting.isValidPhone(value)) {
this.setState({validEmailOrPhone: false});