update 优化 密码校验策略增加非法字符限制

This commit is contained in:
疯狂的狮子Li
2024-03-04 10:05:47 +08:00
parent 26cfa7afc4
commit 5cb40abe18
3 changed files with 12 additions and 4 deletions

View File

@ -44,7 +44,8 @@ const rules = ref({
max: 20,
message: '长度在 6 到 20 个字符',
trigger: 'blur'
}
},
{ pattern: /^[^<>"'|\\]+$/, message: "不能包含非法字符:< > \" ' \\\ |", trigger: "blur" }
],
confirmPassword: [
{ required: true, message: '确认密码不能为空', trigger: 'blur' },