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

helper function to generate params schema with custom names and zod string validators among "uuid" | "nanoid" | "cuid" | "cuid2" | "ulid" #7

Merged
merged 6 commits into from
Oct 31, 2024

Conversation

laurentlahmy
Copy link
Contributor

I wanted to use nanoid because it's cute :)

I do not entirely know what I'm doing. Hope this is anything.

If you like the idea this could be also be augmented with validators options for "number" and "slug", which would bring a named params schema generator function that covers all (or most) param "types" and names.

@laurentlahmy
Copy link
Contributor Author

I see that pnpm-lock.yaml is in the commits, not sure what to do about it :/

@w3cj w3cj merged commit 4c3b857 into w3cj:main Oct 31, 2024
3 checks passed
@w3cj
Copy link
Owner

w3cj commented Oct 31, 2024

Thanks! We recently added the "SlugParamsSchema" and "IdUUIDParamsSchema" but I'd be open to other similar helpers if you'd find them useful.

@w3cj
Copy link
Owner

w3cj commented Oct 31, 2024

Available in v1.3.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants