Restrict the length of emails as per RFC (#24269)

This commit is contained in:
Hariom Balhara authored and GitHub committed 2025-10-06 10:22:58 +00:00
1 parent 7799b191ec
commit bbe46eaa7d
2 files changed
+13 -2

No files matched your search

+1 -1
View File
@@ -709,7 +709,7 @@ export const emailSchema = emailRegexSchema;
// I introduced this refinement(to be used with z.email()) as a short term solution until we upgrade to a zod
// version that will include updates in the above PR.
export const emailSchemaRefinement = (value: string) => {
return emailRegex.test(value);
return emailSchema.safeParse(value).success;
};
export const signupSchema = z.object({