diff --git a/src/frontend/src/components/CreateProject/FormContents/BasicInformation/index.tsx b/src/frontend/src/components/CreateProject/FormContents/BasicInformation/index.tsx index 6ceebb3e..1b043dcc 100644 --- a/src/frontend/src/components/CreateProject/FormContents/BasicInformation/index.tsx +++ b/src/frontend/src/components/CreateProject/FormContents/BasicInformation/index.tsx @@ -17,6 +17,7 @@ export default function BasicInformation({ placeholder="Enter Name of the Project" {...register('name', { required: 'Name of the project is required', + setValueAs: (value: string) => value.trim(), })} /> @@ -28,6 +29,7 @@ export default function BasicInformation({ placeholder="Description of the Project" {...register('description', { required: 'Description is Required', + setValueAs: (value: string) => value.trim(), })} /> diff --git a/src/frontend/src/components/CreateProject/FormContents/Contributions/index.tsx b/src/frontend/src/components/CreateProject/FormContents/Contributions/index.tsx index d941d23f..79d0bd69 100644 --- a/src/frontend/src/components/CreateProject/FormContents/Contributions/index.tsx +++ b/src/frontend/src/components/CreateProject/FormContents/Contributions/index.tsx @@ -28,6 +28,7 @@ export default function Conditions({ placeholder="Enter Instructions for Drone Operators" {...register('per_task_instructions', { required: 'Instructions are required', + setValueAs: (value: string) => value.trim(), })} />