v3.3.1
Playground

Guides

Task-focused answers for validation, nested objects, references, browser use, and customization.

Guides

Start with the task you are trying to finish. Each guide gives the useful decision or snippet first, followed by detail and a runnable example where it helps.

I need to…Guide
Run Zod refinements during Mongoose validationValidate documents
Keep or reject unknown object keysObject modes and unknown keys
Control IDs on nested objectsNested object IDs
Reuse a Zod object across filesReusing object schemas
Reference and populate another modelReferences and population
Type populated queriesStrict Model
Share schemas with a browser or Nuxt appBrowser and Nuxt
Add a plugin or conversion hookPlugins and hooks
Upgrade from older APIsMigration

For function signatures and complete type mappings, use the API reference.