diff --git a/src/helper/validationUtils.js b/src/helper/validationUtils.js index 265e797..8e1111c 100644 --- a/src/helper/validationUtils.js +++ b/src/helper/validationUtils.js @@ -95,11 +95,19 @@ class ValidationUtils { // Validate each key in the schema and loop over wildcards if they are not in schema for ( const key in schema ) { - if (key === "rules" || key === "description" || key === "schema") { + if (key === "rules" || key === "description" || key === "schema" || key === "version") { continue; } const fieldSchema = schema[key]; + + // Skip non-object schema entries (e.g. primitive values injected by migration) + if (fieldSchema === null || typeof fieldSchema !== 'object') { + this.logger.debug(`${name}.${key} has a non-object schema entry (${typeof fieldSchema}). Skipping.`); + validatedConfig[key] = fieldSchema; + continue; + } + const { rules = {} } = fieldSchema; // Default to the schema's default value if the key is missing