Skip to content

Using FluentValidation instead of FluentValidation.AspNetCore #97

Closed
@lonix1

Description

@lonix1

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 of FluentValidation.AspNetCore (otherwise I will get double validation, once by MVC and once inside Mediatr).

Of course that causes this warning:

WRN | MicroElements.Swashbuckle.FluentValidation.FluentValidationRules | ValidatorFactory is not provided. Please register FluentValidation.

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions