Skip to content

Add support for using Zod to validate environment variables #10

Open

Description

@blurrah

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions