Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Validate Query Params #3

Open
tobad357 opened this issue Feb 3, 2022 · 0 comments
Open

Validate Query Params #3

tobad357 opened this issue Feb 3, 2022 · 0 comments
Labels
enhancement New feature or request

Comments

@tobad357
Copy link

tobad357 commented Feb 3, 2022

Is your feature request related to a problem? Please describe.
It would be nice to be able to validate query params to make sure they follow certain Zod rules

Describe the solution you'd like

export const TestSchema = createHttpSchema({
  "GET /test/:id": {
   queryParams { 
      id: z.number().lte(10).gte(5)
    }
  },
});

Describe alternatives you've considered
The alternative is to handle it manually

@Antman261 Antman261 added the enhancement New feature or request label Jun 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Development

No branches or pull requests

2 participants