mirror of
https://github.com/ccmjga/zhilu-admin
synced 2026-03-14 05:33:42 +08:00
refactor(component): 优化部门、岗位和用户创建功能的参数校验
- 在 DepartmentOperatorTool、PositionOperatorTool 和 UserRolePermissionOperatorTool 中添加了 @Size 注解- 用于限制部门名称、岗位名称和用户名的长度 - 更新了前端 UserUpsertModal 组件中用户名的校验规则
This commit is contained in:
@@ -154,7 +154,7 @@ const handleSubmit = async () => {
|
||||
.string({
|
||||
message: "用户名不能为空",
|
||||
})
|
||||
.min(4, "用户名至少4个字符")
|
||||
.min(1, "用户名至少1个字符")
|
||||
.max(15, "用户名最多15个字符"),
|
||||
enable: z.boolean({
|
||||
message: "状态不能为空",
|
||||
|
||||
Reference in New Issue
Block a user