From 7b1883e01281862059131e7d5a9701e66e77df49 Mon Sep 17 00:00:00 2001 From: zhaojisen <1301338853@qq.com> Date: Wed, 9 Oct 2024 18:28:00 +0800 Subject: [PATCH 1/2] fixed: Fixed + and - not being special characters --- src/components/Form/FormFields/UserPassword.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/Form/FormFields/UserPassword.vue b/src/components/Form/FormFields/UserPassword.vue index 562a4d763..c2b6f9111 100644 --- a/src/components/Form/FormFields/UserPassword.vue +++ b/src/components/Form/FormFields/UserPassword.vue @@ -42,7 +42,7 @@ export default { patterns.push([/\d/, i18n.t('common.password.NUMBER_REQUIRED')]) } if (passwordRule['SECURITY_PASSWORD_SPECIAL_CHAR']) { - const pattern = new RegExp("[`~!@#$^&*()=|{}':;',\\[\\].<>/?~!@#¥……&*()——|{}【】‘;:”“'。,、?]") + const pattern = new RegExp("[`~!@#$^&*()=|{}':;',\\[\\].<>/?~!@#¥……&*()——|{}【】‘;:”“'。,、?+-]") patterns.push([pattern, i18n.t('common.password.SPECIAL_CHAR_REQUIRED')]) } for (const [pattern, msg] of patterns) { From f140f2f59edc6e1d2fcb4454475e1fd2def33bef Mon Sep 17 00:00:00 2001 From: zhaojisen <1301338853@qq.com> Date: Wed, 9 Oct 2024 18:35:40 +0800 Subject: [PATCH 2/2] fixed: Fixed + and - not being special characters --- src/components/Form/FormFields/UserPassword.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/Form/FormFields/UserPassword.vue b/src/components/Form/FormFields/UserPassword.vue index c2b6f9111..5023da87e 100644 --- a/src/components/Form/FormFields/UserPassword.vue +++ b/src/components/Form/FormFields/UserPassword.vue @@ -42,7 +42,7 @@ export default { patterns.push([/\d/, i18n.t('common.password.NUMBER_REQUIRED')]) } if (passwordRule['SECURITY_PASSWORD_SPECIAL_CHAR']) { - const pattern = new RegExp("[`~!@#$^&*()=|{}':;',\\[\\].<>/?~!@#¥……&*()——|{}【】‘;:”“'。,、?+-]") + const pattern = new RegExp("[`~!@#$^&*()=|{}':;',\\[\\].<>/?~!@#¥……&*()——|{}【】‘;:”“'。,、?_+-]") patterns.push([pattern, i18n.t('common.password.SPECIAL_CHAR_REQUIRED')]) } for (const [pattern, msg] of patterns) {