AUR4203
Error Message
AUR4203: {{controller}} is not of type ValidationController
Description
This error occurs when the validate binding behavior receives an object that is not a proper ValidationController instance. This typically happens when:
The validation controller is not properly injected
A different object is mistakenly passed as the controller
The controller instance is null or undefined
Common Scenarios
// ❌ Problem: Invalid controller type
export class MyComponent {
controller = {}; // Not a ValidationController
}
Solution
// ✅ Correct: Proper validation controller injection
import { ValidationController, ValidationControllerFactory } from '@aurelia/validation-html';
export class MyComponent {
validationController: ValidationController;
constructor(controllerFactory: ValidationControllerFactory) {
this.validationController = controllerFactory.createForCurrentScope();
}
}
Last updated
Was this helpful?