validators.txt 915 B

123456789101112131415161718192021222324252627282930313233
  1. ==========
  2. Validators
  3. ==========
  4. .. module:: django.contrib.postgres.validators
  5. ``KeysValidator``
  6. -----------------
  7. .. class:: KeysValidator(keys, strict=False, messages=None)
  8. Validates that the given keys are contained in the value. If ``strict`` is
  9. ``True``, then it also checks that there are no other keys present.
  10. The ``messages`` passed should be a dict containing the keys
  11. ``missing_keys`` and/or ``extra_keys``.
  12. .. note::
  13. Note that this checks only for the existence of a given key, not that
  14. the value of a key is non-empty.
  15. Range validators
  16. ----------------
  17. .. class:: RangeMaxValueValidator(limit_value, message=None)
  18. Validates that the upper bound of the range is not greater than
  19. ``limit_value``.
  20. .. class:: RangeMinValueValidator(limit_value, message=None)
  21. Validates that the lower bound of the range is not less than the
  22. ``limit_value``.