---
title: "Guardrails: what the Next Fold schema checks"
description: "The rules Sanity Studio checks before a page can be published: required fields, length limits, allowed sections, and link formats."
url: https://nextfold.marcopontili.com/guardrails
lang: en
---

# Rules every page passes before it publishes

The schema decides what an editor can publish. Its limits are set next to the design, so copy that fits the Studio also fits the page.

[Try to break a rule](https://nextfold.marcopontili.com/guardrails#playground)

## Try to break a rule

A hero with the same rules and messages the Studio uses. The preview changes only when every field passes and you publish.

_An interactive form with the hero's fields and the rules the Studio checks: required heading, length limits, and link format. It runs in the browser on the HTML page._

## What the Studio checks

- **Required fields**: A section without a heading cannot be published.
- **Length limits**: Headings stop at 80 characters. Page descriptions for search run 70 to 160 characters.
- **Allowed sections**: A page accepts only the section types the developers allow. Nothing else shows up in the Add menu.
- **Link formats**: A link is a path on this site or an https:// address. Anything else is turned away.

## When a rule fails

1. **The Studio flags the field**: The field turns red and the message says which rule it broke.
2. **Publishing waits**: The Publish button stays off while any field fails.
3. **The fix goes live**: Once every field passes, the page publishes and open pages refresh.

## The schema is one layer

Hosting, caching, security, and releases have rules of their own.

[How it's run](https://nextfold.marcopontili.com/system)
