Currently to add Valit to the ASP.NET Core app we do the following thing inside Startup:
services.AddMvc().AddValit();
However our validators have an optional parameter for IValitStrategy which is Complete by default. This cannot be used right now since there is no support for specifying which strategy should be picked inside the pipeline. Therefore I thought about some configuration object that could be passed to the extension method:
services.AddMvc().AddValit(new ValitAspNetConfiguration
{
UseCompleteStrategy = false
});
Of course that's just one usage of this configuration object. If you have any suggestions, do hesitate to add them in the comments below :)
Currently to add Valit to the ASP.NET Core app we do the following thing inside
Startup:However our validators have an optional parameter for
IValitStrategywhich is Complete by default. This cannot be used right now since there is no support for specifying which strategy should be picked inside the pipeline. Therefore I thought about some configuration object that could be passed to the extension method:Of course that's just one usage of this configuration object. If you have any suggestions, do hesitate to add them in the comments below :)