Skip to content
public-library›Rules›TanStack Router›Validate search params with defaults at the route

Validate search params with defaults at the route

Give every route that reads search params a validateSearch that parses them, rejects or replaces invalid values, and supplies defaults. Read them only through the route's typed APIs, such as Route.useSearch().

In the full rule