Compare commits

...

2 Commits

Author SHA1 Message Date
TheodorTomas
2c182ed8a1 Merge remote-tracking branch 'origin/main' into fix/resource-not-found-error--1321 2026-02-06 12:04:14 +08:00
TheodorTomas
63c2b99b7e fix: ZId allows strings undefined and null 2026-02-05 18:12:29 +08:00

View File

@@ -20,7 +20,12 @@ export const ZPlacement = z.enum(["bottomLeft", "bottomRight", "topLeft", "topRi
export type TPlacement = z.infer<typeof ZPlacement>;
export const ZId = z.string().cuid2();
export const ZId = z
.string()
.cuid2()
.refine((id) => id !== "undefined" && id !== "null", {
message: "ID cannot be 'undefined' or 'null'",
});
export const ZUuid = z.string().uuid();