增加了前端密码校验

This commit is contained in:
carry 2025-02-20 17:49:43 +08:00
parent 22ed9ab4d7
commit 53668b12e9

View File

@ -82,6 +82,9 @@ const handleConfirm = async () => {
if (!createData.password) {
throw new Error('密码不能为空')
}
if (!/^\d{6,}$/.test(createData.password)) {
throw new Error('密码必须为6位或以上的数字')
}
await userService.createUser({
username: createData.username,
password: createData.password,