# Validating with Zod

Zod writes a request body's rules as a schema, an object that describes the shape the data must have, and safeParse checks a body against it, giving back either the cleaned data or a list of issues that the API turns into its field problems.

![Cheat sheet: Validating with Zod](https://fsdtrainingmedia.blob.core.windows.net/public/images/2026/11/44e2e36c66d6489f9a6243b88908bdde.webp)

- Category: Node.js
- Level: Journeyman
- Tags: 400 Bad Request, nodejs, rest-api, Server-Side Validation, Validation Schema, Zod
- Author: Gregor Dzierzon
- Updated: November 23, 2026

Source: https://www.ask-codey.com/cheat-sheets/node-validation-with-zod-cheat-sheet
