Skip to content

Commit

Permalink
Merge pull request #4534 from frafra/patch-2
Browse files Browse the repository at this point in the history
Add get_validators example
  • Loading branch information
wardi committed Nov 20, 2018
2 parents 2f16230 + affad8e commit bed8453
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions doc/extensions/adding-custom-fields.rst
Expand Up @@ -302,6 +302,11 @@ special schema fields ``'__before'`` or ``'__after'`` to have them
run before or after all the other validation takes place to avoid
the problem of working with partially-validated data.

The validator has to be registered. Example:

.. literalinclude:: ../../ckanext/example_ivalidators/plugin.py
:start-after: from ckan.plugins.toolkit import Invalid
:end-before: def equals_fortytwo(value):

Tag vocabularies
----------------
Expand Down

0 comments on commit bed8453

Please sign in to comment.