{"record":{"id":"95d0cf0625c28c4b","repo":"davila7/claude-code-templates","slug":"unknown-validator-validatorname","errorCode":null,"errorMessage":"⚠️  Unknown validator: ${validatorName}","messagePattern":"⚠️  Unknown validator: (.+?)","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"cli-tool/src/validation/ValidationOrchestrator.js","lineNumber":58,"sourceCode":"    const results = {\n      component: {\n        path: component.path,\n        type: component.type\n      },\n      timestamp: new Date().toISOString(),\n      overall: {\n        valid: true,\n        score: 0,\n        errorCount: 0,\n        warningCount: 0\n      },\n      validators: {}\n    };\n\n    // Run each validator\n    for (const validatorName of validators) {\n      if (!this.validators[validatorName]) {\n        console.warn(chalk.yellow(`⚠️  Unknown validator: ${validatorName}`));\n        continue;\n      }\n\n      try {\n        const validator = this.validators[validatorName];\n        let validatorOptions = {};\n\n        // Validator-specific options\n        if (validatorName === 'semantic') {\n          validatorOptions.strict = strict;\n        } else if (validatorName === 'integrity') {\n          validatorOptions.updateRegistry = updateRegistry;\n        }\n\n        const result = await validator.validate(component, validatorOptions);\n\n        results.validators[validatorName] = {\n          valid: result.valid,","sourceCodeStart":40,"sourceCodeEnd":76,"githubUrl":"https://github.com/davila7/claude-code-templates/blob/a0851ed10c7c60463dac8cfaaca124cf32d5804d/cli-tool/src/validation/ValidationOrchestrator.js#L40-L76","documentation":"ValidationOrchestrator.validateComponent() iterates a list of validator names and looks each up in its this.validators registry. When a requested validator name has no registered implementation, it logs this warning and skips that validator via continue — validation still proceeds with the remaining validators.","triggerScenarios":"Passing a validator name in the validators array that is not a key in the validators map passed to the ValidationOrchestrator constructor — e.g. a typo like 'formt' instead of 'format', or a validator that was renamed/removed in a newer version, or forgetting to register a custom validator before calling validateComponent().","commonSituations":"Typos in validator names in config; upgrading the library after a validator rename; passing custom validator names without registering them in the validators option; assuming a built-in validator exists when only a subset was configured.","solutions":["Check the spelling of the validator name against the keys of the validators map you pass to the ValidationOrchestrator constructor","Log Object.keys(orchestrator.validators) to see which validators are actually registered","If the validator was renamed in a newer version, update the name (check the changelog)","Register a custom validator under that name in the validators option before calling validateComponent"],"exampleFix":"// before\nconst orchestrator = new ValidationOrchestrator({\n  validators: { format: formatValidator }\n});\nawait orchestrator.validateComponent('formt', data); // typo -> warning\n\n// after\nawait orchestrator.validateComponent('format', data);","handlingStrategy":"validation","validationCode":"const valid = Object.keys(orchestrator.validators);\nconst unknown = requestedValidators.filter(v => !valid.includes(v));\nif (unknown.length) {\n  throw new Error(`Unknown validators requested: ${unknown.join(', ')}. Available: ${valid.join(', ')}`);\n}","typeGuard":"const isKnownValidator = (name, registry) =>\n  Object.prototype.hasOwnProperty.call(registry, name);","tryCatchPattern":null,"preventionTips":["Define validator names as constants/enums instead of raw strings","Fail fast on unknown validator names instead of silently skipping","Log the available validator list at startup in debug builds"],"tags":["validation","typo","registry","config"],"backgroundTag":"unknown-validator-name","analyzedSha":"a0851ed10c7c60463dac8cfaaca124cf32d5804d","analyzedAt":"2026-08-28T14:11:56.058Z","schemaVersion":2},"datasetVersion":"2026-08-28T16:17:29.566Z"}