Merge pull request #4385 from jumpserver/pr@dev@fix_special_chara

fixed: Fixed + and - not being special characters
This commit is contained in:
ZhaoJiSen
2024-10-09 18:38:23 +08:00
committed by GitHub

View File

@@ -42,7 +42,7 @@ export default {
patterns.push([/\d/, i18n.t('NUMBER_REQUIRED')]) patterns.push([/\d/, i18n.t('NUMBER_REQUIRED')])
} }
if (passwordRule['SECURITY_PASSWORD_SPECIAL_CHAR']) { if (passwordRule['SECURITY_PASSWORD_SPECIAL_CHAR']) {
const pattern = new RegExp("[`~!@#$^&*()=|{}':;',\\[\\].<>/?~@#¥……&*()——|{}【】‘;:”“'。,、?]") const pattern = new RegExp("[`~!@#$^&*()=|{}':;',\\[\\].<>/?~@#¥……&*()——|{}【】‘;:”“'。,、?_+-]")
patterns.push([pattern, i18n.t('SPECIAL_CHAR_REQUIRED')]) patterns.push([pattern, i18n.t('SPECIAL_CHAR_REQUIRED')])
} }
for (const [pattern, msg] of patterns) { for (const [pattern, msg] of patterns) {