Skip to content

Commit

Permalink
add More range in the trip name and description
Browse files Browse the repository at this point in the history
  • Loading branch information
Tadjaur committed Dec 18, 2024
1 parent dbbf6c8 commit a7c5b6b
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ import { TripActivity } from './enums';

const tripActivityValues = Object.values(TripActivity) as [string, ...string[]];

export const addTripForm = z.object({
name: z.string(),
description: z.string().optional().nullable(),
export const tripForm = z.object({
name: z.string().min(2).max(40),
description: z.string().min(50).max(200).optional().nullable(),
activity: z.enum(tripActivityValues).optional(),
is_public: z.boolean().optional(),
});
Expand Down Expand Up @@ -58,7 +58,7 @@ export const addTripDetails = z.object({
trails: z.string().optional(),
});

export const addTrip = addTripDetails.merge(addTripForm);
export const addTrip = addTripDetails.merge(tripForm);
export type AddTripType = z.infer<typeof addTrip>;

export const editTrip = addTrip.merge(
Expand Down

0 comments on commit a7c5b6b

Please sign in to comment.