Skip to content
Prev Previous commit
Next Next commit
Update src/content/docs/en/guides/upgrade-to/v6.mdx
Co-authored-by: Sarah Rainsberger <[email protected]>
  • Loading branch information
matthewp and sarah11918 authored Dec 11, 2025
commit 5f8c54f8548bf4986881c9072b361431dca6a9e8
2 changes: 1 addition & 1 deletion src/content/docs/en/guides/upgrade-to/v6.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ Notably, many `string()` formats have been deprecated (e.g. `z.string().email()`
}
```

Additionally, if you use `.default()` with transforms, you may need to update your schemas. In Zod 4, default values must match the output type (after transforms), not the input type. The default value short-circuits parsing when the input is `undefined`:
Additionally, if you use [`.default()` with transforms](https://zod.dev/v4/changelog#default-updates), you may need to update your schemas. In Zod 4, default values must match the output type (after transforms), not the input type. The default value short-circuits parsing when the input is `undefined`:

```ts title="src/content.config.ts" del={5-6} ins={7-8}
import { z } from 'astro/zod';
Expand Down