From a8c66bd1a4104141c2bc30c94b70451298f6c596 Mon Sep 17 00:00:00 2001 From: "@fawn-nine" <1271023382@qq.com> Date: Mon, 27 May 2024 09:30:07 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E7=94=A8=E6=88=B7?= =?UTF-8?q?=E9=82=AE=E7=AE=B1=E6=AD=A3=E5=88=99=E6=9D=A1=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/modules/user/user-add-or-update.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/views/modules/user/user-add-or-update.vue b/src/views/modules/user/user-add-or-update.vue index 2ae4e5a..d227be0 100644 --- a/src/views/modules/user/user-add-or-update.vue +++ b/src/views/modules/user/user-add-or-update.vue @@ -244,7 +244,7 @@ } if (this.dataForm.email) { - if (/^\w+@\w+(\.[a-zA-Z]{2,3}){1,2}$/.test(this.dataForm.email) == false) { + if (/^\w+@\w+(\.[a-zA-Z]{2,3}){1,2}$/.test(this.dataForm.email) == false && /^\w+\.[a-zA-Z0-9_-]+@\w+(\.[a-zA-Z]{2,3}){1,2}$/.test(this.dataForm.email) == false) { this.$message.error("邮箱格式错误!") return } From 4c8f06673b815d88553c0b9e5b28da292442a96b Mon Sep 17 00:00:00 2001 From: "@fawn-nine" <1271023382@qq.com> Date: Mon, 27 May 2024 09:41:17 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E7=94=A8=E6=88=B7?= =?UTF-8?q?=E4=BF=A1=E6=81=AF=E9=82=AE=E7=AE=B1=E6=AD=A3=E5=88=99=E8=A1=A8?= =?UTF-8?q?=E8=BE=BE=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/modules/user/user-add-or-update.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/views/modules/user/user-add-or-update.vue b/src/views/modules/user/user-add-or-update.vue index d227be0..9ec4ba8 100644 --- a/src/views/modules/user/user-add-or-update.vue +++ b/src/views/modules/user/user-add-or-update.vue @@ -244,7 +244,7 @@ } if (this.dataForm.email) { - if (/^\w+@\w+(\.[a-zA-Z]{2,3}){1,2}$/.test(this.dataForm.email) == false && /^\w+\.[a-zA-Z0-9_-]+@\w+(\.[a-zA-Z]{2,3}){1,2}$/.test(this.dataForm.email) == false) { + if (/^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/.test(this.dataForm.email) == false){ this.$message.error("邮箱格式错误!") return }