Schema enforcement for Obsidian frontmatter.
Define schemas based on templates or invariants in your vault, add custom reusable types, and more.
Obsidian properties are freeform. Over time, things can break: you change the structure, use an old field, etc. This plugin validates notes against schemas you define. Your notes are untouched, but your vault's consistency becomes easier to manage.
- Open plugin settings
- Create a schema: click + Add Schema
- Set a query to target files
- Add fields: name, type, required/optional
- Violations appear in the status bar/sidebar
The query field allows schema matching based on file paths and/or tags:
| Query | Matches |
|---|---|
Journal |
Files directly in Journal folder |
Journal/* |
Files in Journal and all subfolders |
#book |
Files with #book tag |
Projects/* or #active |
Files matching either condition |
You can also narrow which files a schema applies to with properties:
fileNamePattern: Filter by file name (regex)modifiedAfter/modifiedBefore: Filter by modification datecreatedAfter/createdBefore: Filter by creation datehasProperty/notHasProperty: Filter by property existenceconditions: Filter by property values (property-operator-value list)
Primitives: string, number, boolean, date, array, object, null, unknown
Custom Types: Define reusable types in settings. A custom type is a named group of fields. Use them when multiple schemas share the same structure or you need nested validation.
Union Types: Add multiple field entries with the same name but different types. For example, two entries for status with types string and null creates string | null.
Fields can be flagged to be required (key is required) xor warn (soft requirement). There is also a unique constraint that prevents duplicate values on that field.
Finally, there are cross-field constraints (compare this field's value to another field) and conditional validation (only validate this field when another field matches a condition).
Each field type supports optional constraints:
| Type | Constraints |
|---|---|
| string | pattern (regex), minLength, maxLength |
| number | min, max |
| array | minItems, maxItems, contains (required values) |
| date | min, max |
Copy to .obsidian/plugins/ or install via BRAT.

