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.

utm templates

Kiran K1b7c38d35b36
diff --git a/apps/web/lib/zod/schemas/utm.ts b/apps/web/lib/zod/schemas/utm.ts
index 60539ac47d..c3313f1c31 100644
--- a/apps/web/lib/zod/schemas/utm.ts
+++ b/apps/web/lib/zod/schemas/utm.ts
@@ -1,34 +1,40 @@
import z from "@/lib/zod";
export const createUTMTemplateBodySchema = z.object({
- name: z.string(),
+ name: z.string().min(1).max(50).trim(),
utm_source: z
.string()
+ .max(190)
.nullish()
.transform((v) => v ?? null)
.describe("The UTM source of the short link."),
utm_medium: z
.string()
+ .max(190)
.nullish()
.transform((v) => v ?? null)
.describe("The UTM medium of the short link."),
utm_campaign: z
.string()
+ .max(190)
.nullish()
.transform((v) => v ?? null)
.describe("The UTM campaign of the short link."),
utm_term: z
.string()
+ .max(190)
.nullish()
.transform((v) => v ?? null)
.describe("The UTM term of the short link."),
utm_content: z
.string()
+ .max(190)
.nullish()
.transform((v) => v ?? null)
.describe("The UTM content of the short link."),
ref: z
.string()
+ .max(190)
.nullish()
.transform((v) => v ?? null)
.describe("The ref of the short link."),