class_docstr: 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)
class_docstr_tok: ["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",")"]
docstr: Should return whether the `record` is valid.
  The valid records should have been extended with sign_value().
  
  validate() is called when another DHT peer:
    - Asks us to store the record
    - Returns the record by our request
docstr_tok: ["Should","return","whether","the","`","record","`","is","valid",".","The","valid","records","should","have","been","extended","with","sign_value","(",")",".","validate","(",")","is","called","when","another","DHT","peer",":","-","Asks","us","to","store","the","record","-","Returns","the","record","by","our","request"]
code: def validate(self, record: DHTRecord) -> bool:
      """
      Should return whether the `record` is valid.
      The valid records should have been extended with sign_value().
  
      validate() is called when another DHT peer:
        - Asks us to store the record
        - Returns the record by our request
      """
  
      pass
  
file_path: hivemind/hivemind/dht/validation.py
imports: import dataclasses
  from abc import ABC, abstractmethod
  from typing import Iterable
label_desc: Use image node_id 1 for calling the RecordValidatorBase obj's underlying member method code with example usage: obj.validate(record) without return types