diff --git a/client/web/src/components/modals/ModifyPassword.tsx b/client/web/src/components/modals/ModifyPassword.tsx index 535c8d5b..529f8d45 100644 --- a/client/web/src/components/modals/ModifyPassword.tsx +++ b/client/web/src/components/modals/ModifyPassword.tsx @@ -45,6 +45,10 @@ const schema = createMetaFormSchema({ newPassword: metaFormFieldSchema .string() .min(6, t('密码不能低于6位')) + .matches(/[A-Z]/, '密码必须包含大写字母') + .matches(/[a-z]/, '密码必须包含小写字母') + .matches(/\d/, '密码必须包含数字') + .matches(/[`~!@#$%^&*()_+./,;':"*]/, '密码必须包含符号') .required(t('密码不能为空')), newPasswordRepeat: metaFormFieldSchema .string()