Skip to content

Commit 3aadcba

Browse files
committed
feat: support contact email list
Closes #4390 Users requested to setup multiple emails in our default form action.
1 parent 8427428 commit 3aadcba

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

apps/builder/app/builder/features/project-settings/section-general.tsx

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,12 @@ export const SectionGeneral = () => {
5151
);
5252
const siteNameId = useId();
5353
const contactEmailId = useId();
54+
const contactEmail = (meta.contactEmail ?? "").trim();
5455
const contactEmailError =
55-
(meta.contactEmail ?? "").trim().length === 0 ||
56-
Email.safeParse(meta.contactEmail).success
56+
contactEmail.length === 0 ||
57+
contactEmail
58+
.split(",")
59+
.every((email) => Email.safeParse(email.trim()).success)
5760
? undefined
5861
: "Contact email is invalid.";
5962
const assets = useStore($assets);

0 commit comments

Comments
 (0)