I'm using ASP.NET Core, with the built-in container.
Registration is supposed to be done like so:
services
.AddMvc()
.AddFluentValidation(fv => fv.RegisterValidatorsFromAssemblyContaining<Startup>())
This automatically:
But I want to register my validators manually. How do I do that?
// must first setup FV
services
.AddMvc()
.AddFluentValidation(fv => {});
// can then manually register validators
services.AddTransient<IValidator<Foo>, FooValidator>();
services.AddTransient<IValidator<Bar>, BarValidator>();