TanStackT
TanStack14mo ago
3 replies
worthy-azure

How to reset search params when not validated?

How to completly clear search params when not passed validation?

heres my validation:

const projectEstimateSearchSchema = z.object({
  module: z.union([z.number(), z.string()]).optional(),
  role: z.union([z.number(), z.string()]).optional(),
  task: z.union([z.number(), z.string()]).optional(),
});


when validation faile i want to clear my search params
Was this page helpful?