From 15b6c1590fab9f97b77cdb295b68e2871b61edee Mon Sep 17 00:00:00 2001 From: Stefan Wojcik Date: Wed, 12 Jun 2019 11:37:08 +0200 Subject: [PATCH] Add extra context to the BaseDocument.validate docstring --- mongoengine/base/document.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/mongoengine/base/document.py b/mongoengine/base/document.py index 2e8dd9f1..789687ac 100644 --- a/mongoengine/base/document.py +++ b/mongoengine/base/document.py @@ -348,6 +348,9 @@ class BaseDocument(object): def validate(self, clean=True): """Ensure that all fields' values are valid and that required fields are present. + + Raises :class:`ValidationError` if any of the fields' values are found + to be invalid. """ # Ensure that each field is matched to a valid value errors = {}