File tree Expand file tree Collapse file tree 3 files changed +17
-1
lines changed
docs/src/app/docs/customization Expand file tree Collapse file tree 3 files changed +17
-1
lines changed Original file line number Diff line number Diff line change 1+ ---
2+ " @t3-oss/env-core " : minor
3+ ---
4+
5+ update skipValidation flag to skip validation for extended presets
Original file line number Diff line number Diff line change @@ -16,6 +16,8 @@ Skipping validation is not encouraged and will lead to your types and runtime va
1616
1717</Callout >
1818
19+ When enabled, validation will be skipped for both your environment variables and any [ extended presets] ( #extending-presets ) .
20+
1921``` ts title="src/env.ts"
2022import { createEnv } from " @t3-oss/env-core" ;
2123
Original file line number Diff line number Diff line change @@ -324,7 +324,16 @@ export function createEnv<
324324 }
325325
326326 const skip = ! ! opts . skipValidation ;
327- if ( skip ) return runtimeEnv as any ;
327+ if ( skip ) {
328+ if ( opts . extends ) {
329+ for ( const preset of opts . extends ) {
330+ preset . skipValidation = true ;
331+ }
332+ }
333+
334+ // biome-ignore lint/suspicious/noExplicitAny: <explanation>
335+ return runtimeEnv as any ;
336+ }
328337
329338 const _client = typeof opts . client === "object" ? opts . client : { } ;
330339 const _server = typeof opts . server === "object" ? opts . server : { } ;
You can’t perform that action at this time.
0 commit comments