# Schema Validation

Schema Validation: Schema Validation with $jsonSchema.

Updated: November 19, 2026

1. [Schema Validation with $jsonSchema](https://www.ask-codey.com/lessons/mongodb-schema-validation) (Journeyman): 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.

Source: https://www.ask-codey.com/courses/mongodb-in-depth/topics/mongodb-schema-validation
