Skip to content

Commit

Permalink
Merge pull request #1394 from andrew-bierman/validation_order
Browse files Browse the repository at this point in the history
potential fix/the error doesnt make sense: could be reversed!
  • Loading branch information
pinocchio-life-like authored Dec 30, 2024
2 parents 3444ffd + ec4f722 commit 8df9af5
Showing 1 changed file with 3 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,10 @@ export const tripForm = z.object({
name: z.string().min(3).max(40),
description: z
.string()
.transform((val) => {
return val === '' ? undefined : val;
})
.pipe(z.string().min(20).max(200).nullable().optional())
.optional()
.nullable(),
.nullable()
.transform((val) => (val === '' ? undefined : val))
.pipe(z.string().min(20).max(200).nullable().optional()),
activity: z.enum(tripActivityValues).optional(),
is_public: z.boolean().optional(),
});
Expand Down

0 comments on commit 8df9af5

Please sign in to comment.