Skip to content

Commit 752317b

Browse files
stenniekay-kim
authored andcommitted
DOCS-11615: Correct example using collMod to add/update validation for an existing collection
1 parent d315193 commit 752317b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

source/reference/command/collMod.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,7 @@ The following example adds a validator to an existing collection named
254254

255255
.. code-block:: javascript
256256

257-
db.createCollection( "contacts", {
257+
db.runCommand( { collMod: "contacts",
258258
validator: { $jsonSchema: {
259259
bsonType: "object",
260260
required: [ "phone" ],

0 commit comments

Comments
 (0)