Skip to content

Commit

Permalink
add changeset
Browse files Browse the repository at this point in the history
  • Loading branch information
edmundhung committed Sep 10, 2024
1 parent 026cdac commit 475c013
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions .changeset/empty-guests-hear.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
'@conform-to/zod': patch
---

fix(conform-zod): empty string default value support

Previously, we suggested using `.default()` to set a fallback value. However, `.default()` does not work as expected with `z.string().default('')`. This issue has now been resolved, but keep in mind that the default value is still subject to validation errors. For more predictable results, we recommend using `.transform(value => value ?? defaultValue)` instead.

Fix #676

0 comments on commit 475c013

Please # to comment.