From ea1564018ef365b5855d6237147c71ba1ae7567a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A7=8B=E4=BA=8E=E5=88=9D=E8=A7=81?= <752204717@qq.com> Date: Wed, 6 May 2026 09:52:32 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BF=85=E5=A1=AB=E9=A1=B9=20=E5=8F=98?= =?UTF-8?q?=E6=88=90=E8=8B=B1=E6=96=87=E6=8F=90=E7=A4=BA=E8=AF=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../page/YouthEditorialBoardRegistration.vue | 25 ++++++++++++++----- 1 file changed, 19 insertions(+), 6 deletions(-) diff --git a/src/components/page/YouthEditorialBoardRegistration.vue b/src/components/page/YouthEditorialBoardRegistration.vue index 80f106d..45f2e29 100644 --- a/src/components/page/YouthEditorialBoardRegistration.vue +++ b/src/components/page/YouthEditorialBoardRegistration.vue @@ -27,14 +27,13 @@ type="text" v-model="formData.engName" placeholder="" - required autocomplete="off" />
- +
@@ -43,7 +42,6 @@ type="text" v-model="formData.password" placeholder="" - required autocomplete="off" />
@@ -317,7 +315,22 @@ export default { 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')) { this.alertError('Registration failed: QQ email addresses are not accepted.'); return; @@ -340,8 +353,8 @@ export default { .post('api/Ucenter/submitApplyYboardForExpert', { journal_id: this.journalId, expert_id: this.expertId, - name: this.formData.engName, - email: this.formData.email, + name: engName, + email: emailRaw, cv: this.uploadedCvPath, password: this.formData.password })