davila7/claude-code-templates · warning
⚠️ Unknown validator: ${validatorName}
Error message
⚠️ Unknown validator: ${validatorName} What it means
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.
Source
Thrown at cli-tool/src/validation/ValidationOrchestrator.js:58
const results = {
component: {
path: component.path,
type: component.type
},
timestamp: new Date().toISOString(),
overall: {
valid: true,
score: 0,
errorCount: 0,
warningCount: 0
},
validators: {}
};
// Run each validator
for (const validatorName of validators) {
if (!this.validators[validatorName]) {
console.warn(chalk.yellow(`⚠️ Unknown validator: ${validatorName}`));
continue;
}
try {
const validator = this.validators[validatorName];
let validatorOptions = {};
// Validator-specific options
if (validatorName === 'semantic') {
validatorOptions.strict = strict;
} else if (validatorName === 'integrity') {
validatorOptions.updateRegistry = updateRegistry;
}
const result = await validator.validate(component, validatorOptions);
results.validators[validatorName] = {
valid: result.valid,View on GitHub (pinned to a0851ed10c)
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
Example fix
// before
const orchestrator = new ValidationOrchestrator({
validators: { format: formatValidator }
});
await orchestrator.validateComponent('formt', data); // typo -> warning
// after
await orchestrator.validateComponent('format', data); Defensive patterns
Strategy: validation
Validate before calling
const valid = Object.keys(orchestrator.validators);
const unknown = requestedValidators.filter(v => !valid.includes(v));
if (unknown.length) {
throw new Error(`Unknown validators requested: ${unknown.join(', ')}. Available: ${valid.join(', ')}`);
} Type guard
const isKnownValidator = (name, registry) => Object.prototype.hasOwnProperty.call(registry, name);
Prevention
- 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
When it happens
Trigger: 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().
Common situations: 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.
Related errors
- Invalid workflow hash format. Expected format: #hash
- Invalid hash format: missing encoded data
- Invalid session file - missing version
- Invalid session file - missing conversation data
- Invalid session file - missing or invalid messages
AI-assisted analysis of davila7/claude-code-templates@a0851ed10c (2026-08-28).
Data as JSON: /api/errors/95d0cf0625c28c4b.
Report an issue: GitHub.