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

feat: Are you interested in adding Valibot? #1527

Open
fabian-hiller opened this issue Jul 31, 2023 · 5 comments
Open

feat: Are you interested in adding Valibot? #1527

fabian-hiller opened this issue Jul 31, 2023 · 5 comments
Labels
🌟 enhancement New feature or request

Comments

@fabian-hiller
Copy link

Is your feature request related to a problem? Please describe.

Valibot is a new schema library, similar to Zod, but with a much smaller bundle size and probably better performance in real world scenarios. Are you interested in adding Valibot to create-t3-app?

Valibot announcement post: https://www.builder.io/blog/introducing-valibot

Describe the solution you'd like to see

Add Valibot as an alternatvie to Zod.

Describe alternate solutions

Add Valibot once v1 is reached.

Additional information

No response

@fabian-hiller fabian-hiller added the 🌟 enhancement New feature or request label Jul 31, 2023
@c-ehrlich
Copy link
Member

c-ehrlich commented Aug 3, 2023

I saw Valibot on twitter a few days ago, looks exciting! Definitely interested, especially if/once there is a significant TS server performance benefit over Zod despite (near-)feature parity - the bundle size difference is not nearly as big a deal. But IMO the right order of events here is that a few key libraries like tRPC, react-hook-form, etc. get first class support for Valibot, and then we consider whether the switch is worth it for CT3A.

@fabian-hiller
Copy link
Author

Thank you for your feedback. I agree with you. For tRPC I have already submitted the corresponding PR and for React Hook Form a community member will do it. I'll probably report back here in September after Valibot is integrated into more projects and I've done some more performance research.

@stunaz
Copy link

stunaz commented Aug 28, 2023

trpc(https://trpc.io/docs/server/validators#with-valibot) and react-hook-form (react-hook-form/resolvers#602) already support Valibot

@vuolter
Copy link

vuolter commented Sep 18, 2024

Definitely want it here as on t3-oss/t3-env#6 😃
Valibot documentation is super neat!

@fabian-hiller
Copy link
Author

A few schema library authors are currently working on a common interface. This may allow CT3A to support any schema library that supports this interface in the future. This will simplify the integration of schema libraries and prevent vendor lock-in, which could lead to more innovation in the long run.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🌟 enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants