From daca58507cd0a81e17a70287c44680b30392f728 Mon Sep 17 00:00:00 2001 From: dataeaseShu Date: Fri, 25 Jul 2025 16:29:08 +0800 Subject: [PATCH] fix: bug fix --- frontend/src/i18n/en.json | 1 + frontend/src/i18n/zh-CN.json | 1 + frontend/src/views/system/user/User.vue | 8 +++++++- 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/frontend/src/i18n/en.json b/frontend/src/i18n/en.json index fe6f774b..57fc3c3b 100644 --- a/frontend/src/i18n/en.json +++ b/frontend/src/i18n/en.json @@ -225,6 +225,7 @@ "field_type": "Field type", "field_name": "Field name", "copy": "Copy", + "incorrect_email_format": "Incorrect email format", "the_original_one": "Are you sure you want to restore the password to the original one?", "relevant_content_found": "No relevant content found", "please_enter": "Please enter", diff --git a/frontend/src/i18n/zh-CN.json b/frontend/src/i18n/zh-CN.json index 6a57811e..8211dc67 100644 --- a/frontend/src/i18n/zh-CN.json +++ b/frontend/src/i18n/zh-CN.json @@ -225,6 +225,7 @@ "confirm": "确定", "copy": "复制", "the_original_one": "确认恢复为初始密码吗?", + "incorrect_email_format": "邮箱格式不对", "enabled_status": "启用状态", "custom_notes": "自定义备注", "field_type": "字段类型", diff --git a/frontend/src/views/system/user/User.vue b/frontend/src/views/system/user/User.vue index 8f8da5eb..d74f816a 100644 --- a/frontend/src/views/system/user/User.vue +++ b/frontend/src/views/system/user/User.vue @@ -457,6 +457,12 @@ const rules = { message: t('datasource.please_enter') + t('common.empty') + t('user.email'), trigger: 'blur', }, + { + required: true, + pattern: /^[a-zA-Z0-9_._-]+@[a-zA-Z0-9_-]+(\.[a-zA-Z0-9_-]+)+$/, + message: t('datasource.incorrect_email_format'), + trigger: 'blur', + }, ], } @@ -739,7 +745,7 @@ const editTerm = () => { }) } -const duplicateName = async () => { +const duplicateName = () => { if (state.form.id) { editTerm() } else {