Restrict the length of emails as per RFC (#24269)
This commit is contained in:
1 parent
7799b191ec
commit
bbe46eaa7d
2 files changed
+13
-2
No files matched your search
@@ -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({
|
||||
|
||||
Reference in new issue
Block a user