fix: email-address with apostrophe not accepted (#15535)

Co-authored-by: Keith Williams <[email protected]>
Co-authored-by: Omar López <[email protected]>
Co-authored-by: Amit Sharma <[email protected]>
This commit is contained in:
authored and GitHub committed 2024-10-15 00:21:26 +00:00
1 parent 5927b42560
commit 2be9fc8bc0
27 files changed
+77 -42

No files matched your search

@@ -5,6 +5,7 @@ import { useMemo, useState } from "react";
import { Controller, useForm, useFormContext } from "react-hook-form";
import { z } from "zod";
import { emailSchema } from "@calcom/lib/emailSchema";
import { useLocale } from "@calcom/lib/hooks/useLocale";
import { MembershipRole } from "@calcom/prisma/enums";
import { trpc, type RouterOutputs } from "@calcom/trpc/react";
@@ -46,7 +47,7 @@ const attributeSchema = z.object({
const editSchema = z.object({
name: z.string(),
username: z.string(),
email: z.string().email(),
email: emailSchema,
avatar: z.string(),
bio: z.string(),
role: z.enum([MembershipRole.MEMBER, MembershipRole.ADMIN, MembershipRole.OWNER]),