diff --git a/src/App.tsx b/src/App.tsx
index 7c0a1db..a0bc009 100644
--- a/src/App.tsx
+++ b/src/App.tsx
@@ -103,6 +103,11 @@ function App() {
);
return;
}
+ // validate email format if provided
+ if (form.creatorEmail && !/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(form.creatorEmail)) {
+ setFormError("Please enter a valid email address.");
+ return;
+ }
// validate start < end
if (form.isAllDay) {
if (form.eDate <= form.sDate) {
@@ -418,7 +423,45 @@ function App() {
- {/* Collapsible section for password protection */}
+ {/* Collapsible section for organizer email */}
+
+ Organizer email (optional)
+
+ }
+ >
+
+ Add an organizer email
+
+ }
+ className="my-4 text-left"
+ description={
+
+ We will use this email to enable RSVP functionality for attendees.
+
+ Attendees can respond with Yes, No, or Maybe to your event.
+
+ It won't be exposed unless you share the event.
+