Commits

Andriy Kornatskyy committed e68daf3

Added predicate rule to documentation.

  • Participants
  • Parent commits 27fee87

Comments (0)

Files changed (1)

File doc/userguide.rst

 * ``compare``. Compares attribute being validated with some other attribute
   value. Supported comparison operations include: ``equal``,
   ``not_equal``. See :py:class:`~wheezy.validation.rules.CompareRule`.
+* ``predicate``. Fails if predicate return boolean ``False``. Predicate
+  is any callable that accepts model and returns boolean. It is
+  useful for custom rules, e.g. a number of days between two model
+  properties must not exceed certain value, etc.
+  See :py:class:`~wheezy.validation.rules.PredicateRule`.
 * ``regex``. Search for regular expression pattern. Initialized with
   ``regex`` as a regular expression pattern or a pre-compiled regular
   expression. Supports ``nagated`` argument.