Skip to main content
These docs are written for two readers: you, and the agent that writes code next to you. Everything here is also served in the forms agents read best, so an agent can write Validity rules from the documentation instead of from what it half remembers.

Connect the MCP server

The docs run a Model Context Protocol server that lets an agent search them and read whole pages as Markdown, while it works:
The menu at the top of every page also has Copy MCP server and buttons that install it in Cursor and VS Code.

Install the skill

The skill teaches an agent how Validity code is written: the entries, what null means, the imports, and the mistakes that compile but do the wrong thing. Add it to your agent with:

Read the docs as text

A request with Accept: text/markdown gets the Markdown of a page at its normal address too.

From any page

The Copy page menu at the top of every page copies it as Markdown, opens it as Markdown, or sends it to Claude, ChatGPT or Perplexity with a question.

What to ask

Write the rules of a class

“Using the Validity docs, write the validation of this SignupRequest: the email is required, the phone is optional but must be a Brazilian mobile.”

Translate the messages

“Write a Validity.configure block with every default message of Validity in Spanish.”

Find the constraint

“Which Validity constraint checks an IBAN, and what code does its violation have?”

Review the rules

“Check these Validity rules against the docs: is anything run outside a rule inside failFast?”