# Input Validation

> Validate and constrain untrusted input at the boundary. Use on any handler that accepts external data.

- Skill: `archive228/input-validation` (Agent Skill)
- Install (CLI): `npx skillmds@latest add archive228/input-validation`
- Raw SKILL.md: https://api.skillmd.com/api/skills/archive228/input-validation/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: archive228 (https://skillmd.com/u/archive228)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/archive228/input-validation

---

# Input Validation
Validate at the edge, before the data touches logic or storage.
- **Schema** — type, required fields, allowed values. Reject unknown fields rather than ignoring them.
- **Bounds** — string length, number ranges, array size. An unbounded input is a DoS and a memory bomb.
- **Format** — emails, UUIDs, dates parsed and re-validated, not trusted as strings.
- **Files** — size limit, type allowlist (check content, not just extension), no path traversal in names.
- Reject with a clear 4xx and a message that says what's wrong — without leaking internals.
Never trust "it comes from our own frontend". The request can come from anywhere.

