-
-
Notifications
You must be signed in to change notification settings - Fork 64
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
Using FluentValidation instead of FluentValidation.AspNetCore #97
Comments
TL;DRCan this library work if I'm using |
Can you create simple repro with Mediatr? Main class |
Thanks!!! Please tell me if I understand correctly?
If correct, it would be a good idea to add it to docs ("Common problems and workarounds"). |
Yes you are right. |
@petriashev Ok see latest PR when you get a chance |
When using this workaround, I am getting the following warning: |
Yes, |
What version is the "latest"? I am using Microelements.Swashbuckle.FluentValidation version 5.7.0 with FluentValidation.AspNetCore version 11.2.2 and get the message "ValidatorFactory is not provided. Please register FluentValidation." if I don't call |
@CollinAlpert Try 6.0.0-beta.1 |
Thanks so much, that fixed it! |
Hello @petriashev, thanks for this great library! I've been using it for a while.
I am now using FluentValidation inside a Mediatr pipeline. So now I reference
FluentValidation
instead ofFluentValidation.AspNetCore
(otherwise I will get double validation, once by MVC and once inside Mediatr).Of course that causes this warning:
And of course the validation details are not shown in Swagger.
However I am still using FluentValdation, just in a different way. My validator classes are still the same. The container still has registrations for all the validators.
How can I make this work?
The text was updated successfully, but these errors were encountered: