必填项 变成英文提示词
This commit is contained in:
@@ -27,14 +27,13 @@
|
|||||||
type="text"
|
type="text"
|
||||||
v-model="formData.engName"
|
v-model="formData.engName"
|
||||||
placeholder=""
|
placeholder=""
|
||||||
required
|
|
||||||
autocomplete="off"
|
autocomplete="off"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label><span class="required-star">*</span> Email (QQ mail is not allowed)</label>
|
<label><span class="required-star">*</span> Email (QQ mail is not allowed)</label>
|
||||||
<input type="email" v-model="formData.email" placeholder="" required autocomplete="off" />
|
<input type="email" v-model="formData.email" placeholder="" autocomplete="off" />
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
@@ -43,7 +42,6 @@
|
|||||||
type="text"
|
type="text"
|
||||||
v-model="formData.password"
|
v-model="formData.password"
|
||||||
placeholder=""
|
placeholder=""
|
||||||
required
|
|
||||||
autocomplete="off"
|
autocomplete="off"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
@@ -317,7 +315,22 @@ export default {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
const email = (this.formData.email || '').toLowerCase();
|
const engName = (this.formData.engName || '').trim();
|
||||||
|
if (!engName) {
|
||||||
|
this.alertError('Please enter your English name.');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
const emailRaw = (this.formData.email || '').trim();
|
||||||
|
if (!emailRaw) {
|
||||||
|
this.alertError('Please enter your email address.');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
const email = emailRaw.toLowerCase();
|
||||||
|
if (!/^[-._A-Za-z0-9]+@[A-Za-z0-9_-]+(\.[A-Za-z0-9_-]+)+$/.test(email)) {
|
||||||
|
this.alertError('Please enter a valid email address.');
|
||||||
|
return;
|
||||||
|
}
|
||||||
if (email.endsWith('@qq.com')) {
|
if (email.endsWith('@qq.com')) {
|
||||||
this.alertError('Registration failed: QQ email addresses are not accepted.');
|
this.alertError('Registration failed: QQ email addresses are not accepted.');
|
||||||
return;
|
return;
|
||||||
@@ -340,8 +353,8 @@ export default {
|
|||||||
.post('api/Ucenter/submitApplyYboardForExpert', {
|
.post('api/Ucenter/submitApplyYboardForExpert', {
|
||||||
journal_id: this.journalId,
|
journal_id: this.journalId,
|
||||||
expert_id: this.expertId,
|
expert_id: this.expertId,
|
||||||
name: this.formData.engName,
|
name: engName,
|
||||||
email: this.formData.email,
|
email: emailRaw,
|
||||||
cv: this.uploadedCvPath,
|
cv: this.uploadedCvPath,
|
||||||
password: this.formData.password
|
password: this.formData.password
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user