Skip to content

Commit 15b6c15

Browse files
committed
Add extra context to the BaseDocument.validate docstring
1 parent 4a89852 commit 15b6c15

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

mongoengine/base/document.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -348,6 +348,9 @@ def to_mongo(self, use_db_field=True, fields=None):
348348
def validate(self, clean=True):
349349
"""Ensure that all fields' values are valid and that required fields
350350
are present.
351+
352+
Raises :class:`ValidationError` if any of the fields' values are found
353+
to be invalid.
351354
"""
352355
# Ensure that each field is matched to a valid value
353356
errors = {}

0 commit comments

Comments
 (0)