mirror of
https://github.com/casdoor/casdoor.git
synced 2025-05-23 02:35:49 +08:00
Don't show two errors in verificationCode login page
This commit is contained in:
parent
fdb68bf9c8
commit
5bb12a30d4
@ -797,7 +797,7 @@ class ApplicationEditPage extends React.Component {
|
||||
</Col>
|
||||
<Col span={22} >
|
||||
<Row style={{marginTop: "20px"}} >
|
||||
<Radio.Group onChange={e => {this.updateApplicationField("formOffset", e.target.value);}} value={this.state.application.formOffset}>
|
||||
<Radio.Group buttonStyle="solid" onChange={e => {this.updateApplicationField("formOffset", e.target.value);}} value={this.state.application.formOffset}>
|
||||
<Radio.Button value={1}>{i18next.t("application:Left")}</Radio.Button>
|
||||
<Radio.Button value={2}>{i18next.t("application:Center")}</Radio.Button>
|
||||
<Radio.Button value={3}>{i18next.t("application:Right")}</Radio.Button>
|
||||
|
@ -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});
|
||||
|
Loading…
x
Reference in New Issue
Block a user