New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow AddFluentValidation
to be called directly on IServiceCollection
#1726
Milestone
Comments
Hi, thanks for the suggestion - that seems like a reasonable addition. If you'd like to put together a pull request then I'd be happy to review it. I think the PR would need to do the following:
|
The PR added please verify it. |
Thanks, I'll aim to do that this evening or tomorrow. |
Merged, and will be in the 10.2 release. |
JeremySkinner
changed the title
Add Extension point to register FluentValidation without IMvcBuilder
Allow May 1, 2021
AddFluentValidation
to be called directly on IServiceCollection
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Is your feature request related to a problem?
Not a problem, but enhancement for easy to use in some situations like OrchardCore.
In OrchardCore I don't have access to IMvcBuilder (I can work around it), but if I have an extension point so that I can call
services.AddFluentValidation()
it will be good.Solution
I take a look at the code and figured out that you are just using IMvcBuilder to call
mvcBuilder.AddMvcOptions
which internally is callingservices.Configure<MvcOptions>()
so we can have a new extension point that calls directlyservices.Configure<MvcOptions>()
The text was updated successfully, but these errors were encountered: