Closed svidskiy closed 2 weeks ago
Hello, how correct this approach is for creating a large schema from a subset?
export const createCampaignSchema = z.object({ ...campaignSetupSchema.shape, ...campaignTargetingSchema.shape, ...budgetBiddingSchema.shape });
I think this is ok, or you can use merge:
export const createCampaignSchema = campaignSetupSchema .merge(campaignTargetingSchema) .merge(budgetBiddingSchema)
Hello, how correct this approach is for creating a large schema from a subset?