From 1bfefb1c796135a5739aba50e13bc53c2fc7a9e7 Mon Sep 17 00:00:00 2001 From: alisonjhuh Date: Tue, 8 Jun 2021 14:20:10 -0400 Subject: [PATCH] DOCSP-14244 add reference to db.collection.validate() --- source/core/schema-validation.txt | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/source/core/schema-validation.txt b/source/core/schema-validation.txt index 0d453bde9c8..688e4561d0e 100644 --- a/source/core/schema-validation.txt +++ b/source/core/schema-validation.txt @@ -137,6 +137,11 @@ Validation occurs during updates and inserts. When you add validation to a collection, existing documents do not undergo validation checks until modification. +To perform validation checks on existing documents, use the +:dbcommand:`validate` command or the :method:`db.collection.validate()` +shell helper. + + Existing Documents ~~~~~~~~~~~~~~~~~~ @@ -306,4 +311,5 @@ Additional Information ---------------------- .. seealso:: :dbcommand:`collMod`, :method:`db.createCollection()`, - :method:`db.getCollectionInfos()`. + :method:`db.getCollectionInfos()`, + :method:`db.collection.validate()`.