I have a custom validation controller and in order for it to work with “& validate” I need to inject it like this:
and this works fine.
Topic here why this is needed: https://github.com/aurelia/validation/issues/469
However I am now trying to do this with autoinject. I added:
aurelia.use.transient(CustomValidationController, () => NewInstance.of(CustomValidationController).as(ValidationController));
in my main.js file but it’s not working.
I also tried to use “.key” and “.asKey” but same result. I get the “A ValidationController has not been registered.” error.