diff --git a/src/app/api/chapter-request/route.schema.ts b/src/app/api/chapter-request/route.schema.ts index f14a8dde..9c85cae6 100644 --- a/src/app/api/chapter-request/route.schema.ts +++ b/src/app/api/chapter-request/route.schema.ts @@ -14,21 +14,38 @@ import { z } from "zod"; questions String */ export const ChapterRequest = z.object({ - firstName: z.string().min(1, "Please provide a first name"), - lastName: z.string().min(1, "Please provide a last name"), - universityEmail: z.string().email("This is not a valid email"), + firstName: z + .string() + .min(1, "Please provide a first name") + .max(100, "You can provide at most 100 characters"), + lastName: z + .string() + .min(1, "Please provide a last name") + .max(100, "You can provide at most 100 characters"), + universityEmail: z.string().max(100).email("Please provide a valid email"), phoneNumber: z.string().length(10, "Phone number must be 10 digits"), - university: z.string().min(1, "Please provide a university"), - universityAddress: z.string().min(1, "Please provide an address"), + university: z + .string() + .min(1, "Please provide a university") + .max(100, "You can provide at most 100 characters"), + universityAddress: z + .string() + .min(1, "Please provide an address") + .max(100, "You can provide at most 100 characters"), leadershipExperience: z .string() - .min(1, "Please state some leadership experience"), + .min(1, "Please state some leadership experience") + .max(250, "You can provide at most 250 characters"), motivation: z .string() - .min(1, "Please describe your motivation in joining the legacy project"), + .min(1, "Please describe your motivation in joining the Legacy Project") + .max(250, "You can provide at most 250 characters"), // TODO: Figure out if availabilities should have a better type - availabilities: z.string().min(1, "Please provide some times"), - questions: z.string(), + availabilities: z + .string() + .min(1, "Please provide some availability") + .max(100, "You can provide at most 100 characters"), + questions: z.string().max(100, "You can provide at most 100 characters"), }) satisfies z.ZodType; export const ChapterRequestResponse = z.discriminatedUnion("code", [ diff --git a/src/app/public/start-chapter/page.tsx b/src/app/public/start-chapter/page.tsx index 679c2658..73102778 100644 --- a/src/app/public/start-chapter/page.tsx +++ b/src/app/public/start-chapter/page.tsx @@ -35,7 +35,7 @@ const StartChapter = () => {

{" "} For additional information, feel free to reach out at{" "} - exec@thelegacyproject.org + exec@thelegacyproject.org.

diff --git a/src/components/NewChapterForm.tsx b/src/components/NewChapterForm.tsx index d92023f4..eebb8164 100644 --- a/src/components/NewChapterForm.tsx +++ b/src/components/NewChapterForm.tsx @@ -9,6 +9,8 @@ import { ErrorMessage } from "@hookform/error-message"; import { createChapterRequest } from "@api/chapter-request/route.client"; import { useApiThrottle } from "@hooks"; import { Spinner } from "./skeleton"; +import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; +import { faAsterisk } from "@fortawesome/free-solid-svg-icons"; type ValidationSchema = z.infer; @@ -56,167 +58,182 @@ const NewChapterForm = () => {
-
+
First Name
-
- ( -

- {" "} - * - {message} -

- )} - /> -
+ ( +

+ +

{message}

+

+ )} + />
-
+
Last Name
-
- ( -

- * - {message} -

- )} - /> -
+ ( +

+ +

{message}

+

+ )} + />
-
+
University Email
-
- ( -

- * - {message} -

- )} - /> -
+ ( +

+ +

{message}

+

+ )} + />
-
+
Phone Number
-
- ( -

- * - {message} -

- )} - /> -
+ ( +

+ +

{message}

+

+ )} + />
-
+
College / University
-
- ( -

- * - {message} -

- )} - /> -
+ ( +

+ +

{message}

+

+ )} + />
-
+
College / University Address
-
- ( -

- * - {message} -

- )} - /> -
+ ( +

+ +

{message}

+

+ )} + />
-
+
Do you have any experience in student leadership / club - organization / storytelling?{" "} + organization / storytelling?