Disable validations Per environments (i.e. do not validate on Production) #1924
-
Hi All, this looks like a really great project, but I was looking for a way to set it up so that real-time validations will only be done on Non-Production environments. the idea is to make sure that production environment will run as fast as possible. is there any way to achieve this? Thanks, |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
Is this what you are looking for? // for node use: process.env.ENVIRONMENT
const schema = Deno.env.get( 'ENVIRONMENT' ) === 'production'
? z.any()
: z.string() |
Beta Was this translation helpful? Give feedback.
-
something like this just might work :)
this could potentially help with performance issues as was mentioned here: thanks for the quick response. |
Beta Was this translation helpful? Give feedback.
Is this what you are looking for?