@@ -122,14 +122,14 @@ query expression:
122
122
.. seealso:: :ref:`query operators <query-selectors>`
123
123
124
124
Behavior
125
- ~~~~~~~~
125
+ --------
126
126
127
127
Validation occurs during updates and inserts. When you add validation to
128
128
a collection, existing documents do not undergo validation checks until
129
129
modification.
130
130
131
- Validation Level
132
- ````````````````
131
+ Existing Documents
132
+ ~~~~~~~~~~~~~~~~~~
133
133
134
134
The ``validationLevel`` option determines which operations MongoDB
135
135
applies the validation rules:
@@ -196,7 +196,7 @@ To disable validation entirely, you can set ``validationLevel`` to
196
196
``off``.
197
197
198
198
Accept or Reject Invalid Documents
199
- ``````````````````````````````````
199
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
200
200
201
201
The ``validationAction`` option determines how MongoDB handles
202
202
documents that violate the validation rules:
@@ -255,15 +255,15 @@ proceed:
255
255
2017-12-01T12:31:23.738-0500 W STORAGE [conn1] Document would fail validation collection: example.contacts2 doc: { _id: ObjectId('5a2191ebacbbfc2bdc4dcffc'), name: "Amanda", status: "Updated" }
256
256
257
257
Restrictions
258
- ~~~~~~~~~~~~
258
+ ------------
259
259
260
260
You cannot specify a validator for collections in the ``admin``,
261
261
``local``, and ``config`` databases.
262
262
263
263
You cannot specify a validator for ``system.*`` collections.
264
264
265
265
Bypass Document Validation
266
- ~~~~~~~~~~~~~~~~~~~~~~~~~~
266
+ --------------------------
267
267
268
268
Users can bypass document validation using the
269
269
``bypassDocumentValidation`` option. For a list of commands that
0 commit comments