We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c2f17f0 commit 5b9788eCopy full SHA for 5b9788e
1 file changed
apps/web/src/app/wait-list/schema.ts
@@ -6,11 +6,15 @@ export const WAITLIST_EMAIL_TYPES = [
6
] as const;
7
8
export const waitlistSubmissionSchema = z.object({
9
- domain: z
10
- .string({ required_error: "Domain is required" })
11
- .trim()
12
- .min(1, "Domain is required")
13
- .max(255, "Domain must be 255 characters or fewer"),
+ domain: z
+ .string({ required_error: "Domain is required" })
+ .trim()
+ .min(1, "Domain is required")
+ .max(255, "Domain must be 255 characters or fewer")
14
+ .regex(
15
+ /^(?!:\/\/)([a-zA-Z0-9-]+\.)+[a-zA-Z]{2,}$/,
16
+ "Please enter a valid domain (e.g. example.com)"
17
+ ),
18
emailTypes: z
19
.array(z.enum(WAITLIST_EMAIL_TYPES))
20
.min(1, "Select at least one email type"),
0 commit comments