Skip to content

Commit

Permalink
annagu/fix-value-error (#74)
Browse files Browse the repository at this point in the history
* change value selection to general/high

* change value buttons to general/high instead 2

* fix value error
  • Loading branch information
axgu authored May 27, 2024
1 parent f768a7d commit b46c5d3
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/lib/schemas.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,10 @@ export const ItemSchema = z.object({
shortDescription: z.string().min(3),
categories: z.array(z.nativeEnum(Category)),
color: z.nativeEnum(Color),
value: z.nativeEnum(Value),
value: z.nativeEnum(Value, {
required_error: 'Required',
invalid_type_error: 'Required'
}),
identifiable: z.boolean(),
itemLocation: z.string().min(3),
retrieveLocation: z.nativeEnum(Location),
Expand Down

0 comments on commit b46c5d3

Please sign in to comment.