Docs Menu
Docs Home
/
Compass
/ /

Edit Validation Rules

The Validation tab allows you to manage schema validation rules for a collection.

Schema validation ensures that all documents in a collection follow a defined set of rules, such as conforming to a specific shape or only allowing a specified range of values in fields.

For details, see Set Validation Rules for Your Schema.

1

To enable editing, click Edit rules.

Edit rules in code block
click to enlarge
2

To edit the schema validation rules, click in the code block that the validation rules appear in. Confirm your schema appears as expected.

3

To apply the validation rules, click Apply. To go back, click Cancel.

4

You can preview sample documents that match your validation rules by clicking Preview documents.

5

To confirm applying the validation rules, click Confirm. To go back, click Cancel.

Back

Add Validation Rules

On this page

  • Steps
  • Learn More