Skip to content

Add Validators via Assembly search not working #168

Description

@peteharrison

Hi Team,

Am I missing something?

I am trying to use serviceCollection.AddValidatorsFromAssemblyContaining() to effectively find all instances of my fluent validation validators and add them to the service collection as transient however it doesn't appear to pick them up.

However, if I manually add the validator to the service collection via serviceCollection.AddTransient<IValidator, LoginCommandValidator>(); it works.

Am I not using this correctly? It doesn't throw any errors just isn't picking up my validators.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions