AFAIK no dependency injection container can directly manage an attribute, since it’s instantiated by the runtime and there’s no way to intercept that.
However, they can cheat by either:
- Using a static gateway to the container (example), or
- Using a “BuildUp” feature that injects whatever dependencies are found within an already-constructed object. This is called BuildUp in Unity or InjectProperties in Autofac.
Windsor doesn’t support #2 (ref1, ref2), so you can either:
- Try one of the hacks to make Windsor support #2 (hack1, hack2)
- Use a static gateway
- Implement your own IValidatorBuilder and make it use Windsor to create validators. I’m sure this is implemented somewhere but I can’t find it right now…