> For the complete documentation index, see [llms.txt](https://docs.hypertensor.org/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.hypertensor.org/subnet-template/dht-records/record-validator.md).

# Record Validator

## Record validators are a generic mechanism for checking the DHT records, including:

* Enforcing a data schema (e.g., checking content types)
* Enforcing security requirements (e.g., allowing only the owner to update the record)
* Enforcement using predicates/callables for customizable logic on the DHTRecord (e.g., checking keys match allowable keys, checking expiration dates, etc.)

Record validators are middleware between GET and POST/PUT requests between peers for storing data in the subnet.

When starting the [DHT](https://docs.hypertensor.org/subnet-template/dht-records/pages/rMfBHZmBr1gMqY22HB9T#class-dht.dht-initial_peers-optional-sequence-union-multiaddr-str-none-start-bool-p2p-optional-p2p-n), it can be initialized with an [Iterable](https://docs.python.org/3/library/collections.abc.html#collections.abc.Iterable) of the RecordValidatorBase and will validate in order of priority (see [How To Use](/subnet-template/dht-records/record-validator/how-to-use.md)).

***

## Record Validators:

#### Built-in record validators:

* [Predicate Validators](/subnet-template/dht-records/record-validator/predicate-validator.md)
* [Schema Validator](/subnet-template/dht-records/record-validator/schema-validator.md)
* [Signature Validator](/subnet-template/authorizers/signature-authorizer.md)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs.hypertensor.org/subnet-template/dht-records/record-validator.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
