You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: doc/tutorial.rst
+34Lines changed: 34 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1107,6 +1107,40 @@ The following contains a list of the default odml validations, their message and
1107
1107
|Applies to: ``Section``
1108
1108
|Course of action: Optional validation. Will report any section that does not specify a repository. Add a repository to the reported Section to resolve.
1109
1109
1110
+
Custom validations
1111
+
******************
1112
+
1113
+
Users can write their own validation and register them either with the default validation or add it to their own validation class instance.
1114
+
1115
+
A custom validation handler needs to ``yield`` a ``ValidationError``. See the ``validation.ValidationError`` class for details.
1116
+
1117
+
Custom validation handlers can be registered to be applied on ``odML`` (the odml Document), ``section`` or ``property``.
0 commit comments