# Validation Schema

*noun*

say it: **“val-ih-DAY-shun SKEE-muh”** **/ˌvæləˈdeɪʃən ˈskimə/**

A written description of what valid data looks like, field by field, that a program checks incoming data against.

## What is a **validation schema**?

A **validation schema** describes the shape data must have: its fields, what kind of value each holds, and its limits. A library such as Zod checks values against it, so the rules live in one place.

```javascript
const Student = z.object({
  name: z.string().min(1),
  grade: z.number().int().min(1).max(12),
});
```

## In a sentence

- “When the rules changed, Sam edited the **validation schema** once instead of five if statements.”
- “The **validation schema** says a student's grade is a whole number from 1 to 12.”

Level: Apprentice · [More JavaScript terms at this level](https://www.ask-codey.com/glossary?category=javascript&level=2)

Updated: November 19, 2026

Source: https://www.ask-codey.com/glossary/validation-schema
