Skip to content

Commit 580f281

Browse files
authored
Update environment variable validation to use z.url()
`z.string().url()` is now deprecated, this PR update this doc to use `z.url()` instead.
1 parent d3a3c0b commit 580f281

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

docs/start/framework/react/guide/environment-variables.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -281,14 +281,14 @@ Use Zod for runtime validation of environment variables:
281281
import { z } from 'zod'
282282
283283
const envSchema = z.object({
284-
DATABASE_URL: z.string().url(),
284+
DATABASE_URL: z.url(),
285285
JWT_SECRET: z.string().min(32),
286286
NODE_ENV: z.enum(['development', 'production', 'test']),
287287
})
288288
289289
const clientEnvSchema = z.object({
290290
VITE_APP_NAME: z.string(),
291-
VITE_API_URL: z.string().url(),
291+
VITE_API_URL: z.url(),
292292
VITE_AUTH0_DOMAIN: z.string(),
293293
VITE_AUTH0_CLIENT_ID: z.string(),
294294
})

0 commit comments

Comments
 (0)