diff --git a/src/components/auth/EventAuth.ts b/src/components/auth/EventAuth.ts index f42963b..119e45e 100644 --- a/src/components/auth/EventAuth.ts +++ b/src/components/auth/EventAuth.ts @@ -531,7 +531,7 @@ export class EventAuth { if (!editorEventId.disabled) { // Only validate if it's a new event if (!editorEventId.value) { errors.eventId = "Event ID is required"; - } else if (!editorEventId.value.match(/^[A-Za-z0-9_-]+$/)) { + } else if (!editorEventId.value.match(/^[A-Za-z0-9_\-]+$/)) { errors.eventId = "Event ID can only contain letters, numbers, underscores, and hyphens"; } else if (editorEventId.value.length < 3) { errors.eventId = "Event ID must be at least 3 characters"; @@ -552,7 +552,7 @@ export class EventAuth { // Event Code validation if (!editorEventCode.value) { errors.eventCode = "Event Code is required"; - } else if (!editorEventCode.value.match(/^[A-Za-z0-9_-]+$/)) { + } else if (!editorEventCode.value.match(/^[A-Za-z0-9_\-]+$/)) { errors.eventCode = "Event Code can only contain letters, numbers, underscores, and hyphens"; } else if (editorEventCode.value.length < 3) { errors.eventCode = "Event Code must be at least 3 characters"; diff --git a/src/components/profile/EventEditor.astro b/src/components/profile/EventEditor.astro index f2b46e7..626e1ff 100644 --- a/src/components/profile/EventEditor.astro +++ b/src/components/profile/EventEditor.astro @@ -27,7 +27,7 @@ const { editor_title, form } = config.ui.tables.events; id="editorEventId" class="input input-bordered w-full" placeholder={form.event_id.placeholder} - pattern="[A-Za-z0-9_-]+" + pattern="[A-Za-z0-9_\-]+" minlength="3" maxlength="50" required @@ -49,7 +49,7 @@ const { editor_title, form } = config.ui.tables.events; id="editorEventCode" class="input input-bordered w-full" placeholder={form.event_code.placeholder} - pattern="[A-Za-z0-9_-]+" + pattern="[A-Za-z0-9_\-]+" minlength="3" maxlength="20" required