# Validation

Novel makes use of 2 validation mechanisms: JSON Schema and Zod. both serve specific purpose, for shaping requests and responses and for verifying input.

Although these are optional, it is recommended that you build your system utilizing these tools as much as possible.

## Forms and Requests

Any active validations that you need during development can be supported by Zod. All database models have an accompanying zod definition that can be reused and extended.

Validations within the client should make use of zod as much as possible.

{% embed url="<https://zod.dev/>" %}

You can do more on the client side:

[Using Zod in your Forms →](https://docs.novel.dev/guides/knowledge-base/novel-web-next.js/using-zod-in-forms)

[Using Generated Requests →](https://docs.novel.dev/guides/knowledge-base/novel-web-next.js/using-generated-requests)

[Making a Request to the API →](https://docs.novel.dev/guides/knowledge-base/novel-web-next.js/making-a-request-to-the-api)

For server-side validation. refer to [Validation](/novel-server/validation.md).

## Changelog

* 2024-12-20 - Initial Documentation


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.novel.dev/novel-web/validation.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
