Skip to content

armgit / dub

Public Imported from GitHub
0

The modern link attribution platform. Loved by world-class engineering teams at Twilio, Zillow, Jobber, Vercel, Raycast, and more.

tag name

Kiran Kd02f2566ebee
diff --git a/apps/web/lib/zod/schemas/tags.ts b/apps/web/lib/zod/schemas/tags.ts
index 15f72cbe33..e7e5a90226 100644
--- a/apps/web/lib/zod/schemas/tags.ts
+++ b/apps/web/lib/zod/schemas/tags.ts
@@ -26,7 +26,7 @@ export const getTagsCountQuerySchema = getTagsQuerySchema.omit({
export const tagColorSchema = z
.enum(tagColors, {
- errorMap: (issue, ctx) => {
+ errorMap: () => {
return {
message: `Invalid color. Must be one of: ${tagColors.join(", ")}`,
};
@@ -36,7 +36,12 @@ export const tagColorSchema = z
export const createTagBodySchema = z
.object({
- name: z.string().min(1).trim().describe("The name of the tag to create."),
+ name: z
+ .string()
+ .min(1)
+ .max(50)
+ .trim()
+ .describe("The name of the tag to create."),
color: tagColorSchema.describe(
`The color of the tag. If not provided, a random color will be used from the list: ${tagColors.join(", ")}.`,
),