#no zod
5 messages · Page 1 of 1 (latest)
Astro’s content collections and Actions system rely on Zod for schema validation and type safety. The knowledge sources show that Zod is used to define and enforce schemas for content collections, validate form and JSON inputs in Actions, and provide TypeScript typings throughout your project. For example, when defining a collection schema or an action input validator, Zod is required and imported from astro:content or astro:schema, and all examples use Zod objects for validation and typing purposes Defining the collection schema Actions: Basic usage.
There is no information in the knowledge sources about using Astro’s content collections or Actions without Zod, nor about removing Zod from a project that uses these features. If you are not using content collections or Actions, you may not need Zod, but if you use these features, Zod is required for schema validation and type safety.
In summary:
If your project uses content collections or Actions, you cannot remove Zod. If you do not use these features, the knowledge sources do not provide enough information to confirm whether Zod can be safely removed.
Note: you can ask me a follow up question by @ mentioning me again :speech_balloon:
@cunning tiger Kapa.ai is still learning and improving, please let me know how I did by reacting below.
Let me check the knowledge base for you again. One moment! :books:
If you are not using Astro’s content collections, Actions, or any other features that require Zod schemas, the knowledge sources do not provide explicit information about whether Zod is required as a dependency in your project. All documentation examples and requirements for Zod are tied specifically to those features (content collections and Actions) Defining the collection schema Actions: Basic usage.