Skip to content

Commit

Permalink
Add block for example
Browse files Browse the repository at this point in the history
  • Loading branch information
Grokzen committed Jan 22, 2017
1 parent cb1f314 commit 2cafb9c
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions docs/validation-rules.rst
Original file line number Diff line number Diff line change
Expand Up @@ -452,6 +452,30 @@ Example
Example
-------

Write a example that can show what values is upported. Or just type any comment into the schema for future reference.

It is possible to use in all levels and places in the schema and have no effect on the parsing,
but is useful for humans to read. Similar to ``desc``.

Value for ``example`` ``MUST`` be a string otherwise a ``RuleError`` will be raised upon usage.

Example

.. code-block:: yaml
# Schema
example: List of values
type: seq
sequence:
- type: str
unique: true
example: Each value must be unique and a string
Unique
------

Expand Down

0 comments on commit 2cafb9c

Please sign in to comment.