refactor(component): 优化部门、岗位和用户创建功能的参数校验

- 在 DepartmentOperatorTool、PositionOperatorTool 和 UserRolePermissionOperatorTool 中添加了 @Size 注解- 用于限制部门名称、岗位名称和用户名的长度
- 更新了前端 UserUpsertModal 组件中用户名的校验规则
This commit is contained in:
Chuck1sn
2025-06-16 11:44:51 +08:00
parent 621170b347
commit 5306e24aa2
4 changed files with 8 additions and 4 deletions

View File

@@ -154,7 +154,7 @@ const handleSubmit = async () => {
.string({
message: "用户名不能为空",
})
.min(4, "用户名至少4个字符")
.min(1, "用户名至少1个字符")
.max(15, "用户名最多15个字符"),
enable: z.boolean({
message: "状态不能为空",