Skip to content

Papermark is the open-source DocSend alternative and secure data rooms with built-in analytics and custom domains.

fix: update code validation in AccessRequestSchema

Marc Seitz37f383f2b5d4
diff --git a/ee/features/workflows/lib/types.ts b/ee/features/workflows/lib/types.ts
index 875e482b..2757a0f6 100644
--- a/ee/features/workflows/lib/types.ts
+++ b/ee/features/workflows/lib/types.ts
@@ -106,7 +106,7 @@ export const VerifyEmailRequestSchema = z.object({
export const AccessRequestSchema = z.object({
email: z.string().email("Invalid email address"),
- code: z.string().length(6, "Verification code must be 6 digits"),
+ code: z.string().regex(/^\d{6}$/, "Verification code must be 6 digits"),
});
export type CreateWorkflowRequest = z.infer<typeof CreateWorkflowRequestSchema>;