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.有关详细信息,请参阅为模式设置验证规则。
Steps步骤
2
Make your edits进行编辑
To edit the schema validation rules, click in the code block that the validation rules appear in. Confirm your schema appears as expected.要编辑架构验证规则,请在验证规则显示的代码块中单击。确认架构按预期显示。
3
Apply rules应用规则
To apply the validation rules, click Apply. To go back, click Cancel.要应用验证规则,请单击“应用”。要返回,请单击“取消”。
