Skip to content

Commit 5007665

Browse files
DOCSP-27655 - typo on schema validation page (#2485)
* DOCSP-27655 - typo on schema validation page * updates per review
1 parent d4156e6 commit 5007665

File tree

1 file changed

+18
-14
lines changed

1 file changed

+18
-14
lines changed

source/core/schema-validation/update-schema-validation.txt

Lines changed: 18 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@ Modify Schema Validation
99
.. contents:: On this page
1010
:local:
1111
:backlinks: none
12-
:depth: 1
12+
:depth: 2
1313
:class: singlecol
1414

15-
After you add schema validation to a collection, you can modify your
16-
schema validation at any time. For example, you may decide:
15+
After you add schema validation to a collection, you can modify
16+
validation rules at any time. For example, you may decide:
1717

1818
- That documents in a ``users`` collection no longer require an email
1919
address.
@@ -24,8 +24,8 @@ schema validation at any time. For example, you may decide:
2424
To modify a collection's schema validation, use the :dbcommand:`collMod`
2525
command and specify the updated validation in the ``validator`` object.
2626

27-
Context
28-
-------
27+
About This Task
28+
---------------
2929

3030
You can modify all components of a schema validation, including its
3131
rules, validation level, and validation action.
@@ -40,8 +40,7 @@ Steps
4040
-----
4141

4242
The following procedure creates a collection with validation rules and
43-
then modifies those rules. You will observe the results when inserting
44-
an invalid and valid document.
43+
then modifies those rules.
4544

4645
.. procedure::
4746

@@ -57,14 +56,14 @@ an invalid and valid document.
5756
bsonType: "object",
5857
required: [ "username", "password" ],
5958
properties: {
60-
name: {
59+
username: {
6160
bsonType: "string",
6261
description: "must be a string and is required"
6362
},
6463
password: {
6564
bsonType: "string",
6665
minLength: 8,
67-
description: "must be a string of at least 8 characters, and is required"
66+
description: "must be a string at least 8 characters long, and is required"
6867
}
6968
}
7069
}
@@ -84,7 +83,7 @@ an invalid and valid document.
8483
bsonType: "object",
8584
required: [ "username", "password" ],
8685
properties: {
87-
name: {
86+
username: {
8887
bsonType: "string",
8988
description: "must be a string and is required"
9089
},
@@ -106,10 +105,15 @@ an invalid and valid document.
106105
Results
107106
-------
108107

109-
The following examples show what happens when you insert a valid and
110-
invalid document into the users collection, and how to handle previously
111-
valid documents that are no longer valid as a result of changes to the
112-
validation rules.
108+
The following sections show the results of the updated validation in
109+
these scenarios:
110+
111+
- When you insert an invalid document.
112+
113+
- When you insert a valid document.
114+
115+
- When a previously valid document becomes invalid because of the
116+
validation rule changes.
113117

114118
Insert an Invalid Document
115119
~~~~~~~~~~~~~~~~~~~~~~~~~~

0 commit comments

Comments
 (0)