fix: groups can be created with empty names (#1267)
This commit is contained in:
@@ -6,7 +6,7 @@ import { byIdSchema } from "./common";
|
|||||||
import { zodEnumFromArray } from "./enums";
|
import { zodEnumFromArray } from "./enums";
|
||||||
|
|
||||||
const createSchema = z.object({
|
const createSchema = z.object({
|
||||||
name: z.string().max(64),
|
name: z.string().trim().min(1).max(64),
|
||||||
});
|
});
|
||||||
|
|
||||||
const updateSchema = createSchema.merge(byIdSchema);
|
const updateSchema = createSchema.merge(byIdSchema);
|
||||||
|
|||||||
Reference in New Issue
Block a user