Skip to content

Rallly is an open-source scheduling and collaboration tool designed to make organizing events and meetings easier.

♻️ Replace min() with nonempty() (#1397)

Dev Suthar28762f19aa57
diff --git a/apps/web/src/components/new-participant-modal.tsx b/apps/web/src/components/new-participant-modal.tsx
index d0bf64725..0b361c947 100644
--- a/apps/web/src/components/new-participant-modal.tsx
+++ b/apps/web/src/components/new-participant-modal.tsx
@@ -19,13 +19,13 @@ import VoteIcon from "./poll/vote-icon";
const requiredEmailSchema = z.object({
requireEmail: z.literal(true),
- name: z.string().nonempty().max(100),
+ name: z.string().min(1).max(100),
email: z.string().email(),
});
const optionalEmailSchema = z.object({
requireEmail: z.literal(false),
- name: z.string().nonempty().max(100),
+ name: z.string().min(1).max(100),
email: z.string().email().or(z.literal("")),
});