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.

bound eventQuantity to a positive integer with a max

Pedro Ladeira3708359be07b
diff --git a/apps/web/lib/zod/schemas/leads.ts b/apps/web/lib/zod/schemas/leads.ts
index f5ce2cdc76..bd9ac94a10 100644
--- a/apps/web/lib/zod/schemas/leads.ts
+++ b/apps/web/lib/zod/schemas/leads.ts
@@ -55,6 +55,9 @@ export const trackLeadRequestSchema = z.object({
),
eventQuantity: z
.number()
+ .int()
+ .positive()
+ .max(1000)
.nullish()
.describe(
"The numerical value associated with this lead event (e.g., number of provisioned seats in a free trial). If defined as N, the lead event will be tracked N times.",