# Checking Input by Hand

A server checks every request body before it saves anything, because any program can send anything, and a validation function collects every problem (a missing field, the wrong type, text that's too long, a value that isn't allowed) so the API can answer 400 with the whole list.

![Cheat sheet for Checking Input by Hand: A server checks every request body before it saves anything, because any program can send anything, and a validation function collects every problem (a missing field, the wrong type, text that's too long, a value that isn't allowed) so the API can answer 400 w](https://fsdtrainingmedia.blob.core.windows.net/public/images/2026/11/c39bf21f2f1d44cf8b4debe71ecd8553.webp)

- Category: Node.js
- Level: Apprentice
- Tags: 400 Bad Request, Client-Side Validation, nodejs, Request Body (rest-api), rest-api, Server-Side Validation
- Author: Gregor Dzierzon
- Updated: November 23, 2026

Source: https://www.ask-codey.com/cheat-sheets/node-validation-by-hand-cheat-sheet
