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

Add support for using Zod to validate environment variables #10

Open
blurrah opened this issue Aug 17, 2023 · 0 comments
Open

Add support for using Zod to validate environment variables #10

blurrah opened this issue Aug 17, 2023 · 0 comments

Comments

@blurrah
Copy link
Member

blurrah commented Aug 17, 2023

While having base type checking is fine, it should be good to allow libraries like a Zod to have more exhaustive validation.
There are tons of use cases for this like only allowing certain strings or more advanced parsing of strings/numbers.

While the validateFunction allows you to write custom functions, I'm not entirely sure if this will work with Zod out of the box, perhaps we'd want to make this Zod-first (though that would impact bundle sizes). If this works we'll just need to add the use cases as an example and in the documentation and hope it doesn't conflict with the built in validation.

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

No branches or pull requests

1 participant