# 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: 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.hypertensor.org/subnet-template/dht-records/record-validator.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.
