'二次密码校验'

This commit is contained in:
张磊
2026-04-14 14:17:05 +08:00
parent 447c08a98f
commit 4327f99b01
+2 -1
View File
@@ -73,7 +73,8 @@ const formRules = computed(() => {
confirm_password: [
{
validator: (_rule: any, value: string, cb: any) => {
if (value && value !== form.password) cb(new Error('两次密码不一致'));
if (form.password && !value) cb(new Error('请确认密码'));
else if (value && value !== form.password) cb(new Error('两次密码不一致'));
else cb();
},
},