rework validation documentation based on review

This commit is contained in:
Bastien Gérard
2020-10-18 21:11:16 +02:00
parent c218c8bb6c
commit 3fca3739de
4 changed files with 30 additions and 64 deletions

View File

@@ -426,19 +426,6 @@ either a single field name, or a list or tuple of field names::
first_name = StringField()
last_name = StringField(unique_with='first_name')
Skipping Document validation on save
------------------------------------
You can also skip the whole document validation process by setting
``validate=False`` when calling the :meth:`~mongoengine.document.Document.save`
method::
class Recipient(Document):
name = StringField()
email = EmailField()
recipient = Recipient(name='admin', email='root@localhost')
recipient.save() # will raise a ValidationError while
recipient.save(validate=False) # won't
Document collections
====================