Skip to content

Disable validations Per environments (i.e. do not validate on Production) #1924

Answered by JacobWeisenburger
galarbel asked this question in Q&A
Discussion options

You must be logged in to vote

Is this what you are looking for?

// for node use: process.env.ENVIRONMENT
const schema = Deno.env.get( 'ENVIRONMENT' ) === 'production'
    ? z.any()
    : z.string()

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
1 reply
@dmnd
Comment options

Answer selected by JacobWeisenburger
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants
Converted from issue

This discussion was converted from issue #1921 on January 22, 2023 21:14.