Schema Validation with $jsonSchema
A collection can refuse documents with the wrong shape; a $jsonSchema validator lists the required fields, each field's type, a minimum and the values allowed, createCollection or collMod attaches it, the error names the rule a document broke, and validationLevel and validationAction decide what is checked and what happens.
Updated

- Category
- MongoDB
- Level
- Journeyman
- Tags
- $jsonSchema, collMod, mongodb, Schema Validation, validationLevel and validationAction