Skip to content

Commit

Permalink
fix(project-creation)-#119: trim input values
Browse files Browse the repository at this point in the history
  • Loading branch information
suzit-10 committed Aug 5, 2024
1 parent dd410d3 commit 1bc3c2d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
})}
/>
<ErrorMessage message={errors?.name?.message as string} />
Expand All @@ -28,6 +29,7 @@ export default function BasicInformation({
placeholder="Description of the Project"
{...register('description', {
required: 'Description is Required',
setValueAs: (value: string) => value.trim(),
})}
/>
<ErrorMessage message={errors?.description?.message as string} />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
})}
/>
<ErrorMessage
Expand Down

0 comments on commit 1bc3c2d

Please sign in to comment.