修改免费试用的跳转逻辑和设置密码的校验

This commit is contained in:
Eamon-meng
2025-07-17 14:30:51 +08:00
parent 92ab2e7b14
commit 0ae049e6f5
4 changed files with 89 additions and 40 deletions

View File

@@ -49,9 +49,9 @@ export function ChangePasswordDialog({
const form = useForm<Schema>({
resolver: zodResolver(
schema.refine(
data => /^(?=.*[a-z])(?=.*[A-Z]).{6,}$/.test(data.password),
data => /^(?=.*[a-zA-Z])(?=.*\d).{6,}$/.test(data.password),
{
message: '密码需包含大小写字母且不少于6位',
message: '密码需包含字母和数字且不少于6位',
path: ['password'],
},
),