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.

.positive() → .min(0)

Steven Tey2e5eedfea643
diff --git a/apps/web/lib/zod/schemas/sales.ts b/apps/web/lib/zod/schemas/sales.ts
index 6da0fd32a0..75714ae105 100644
--- a/apps/web/lib/zod/schemas/sales.ts
+++ b/apps/web/lib/zod/schemas/sales.ts
@@ -17,7 +17,7 @@ export const trackSaleRequestSchema = z.object({
amount: z
.number({ required_error: "amount is required" })
.int()
- .positive()
+ .min(0, "amount cannot be negative")
.describe("The amount of the sale. Should be passed in cents."),
paymentProcessor: z
.enum(["stripe", "shopify", "paddle"])