Skip to content

Instantly share code, notes, and snippets.

@AnthonyGiretti
Last active April 8, 2026 00:50
Show Gist options
  • Select an option

  • Save AnthonyGiretti/9d40e229be20b96a0394b79316c73eb9 to your computer and use it in GitHub Desktop.

Select an option

Save AnthonyGiretti/9d40e229be20b96a0394b79316c73eb9 to your computer and use it in GitHub Desktop.
Seeking Validators by reflection when Using FluentValidation <= 11.4
var implementationTypes = AppDomain.CurrentDomain
.GetAssemblies()
.SelectMany(x => x.GetTypes())
.Where(t => t.GetInterface(typeof(IValidator<>).FullName) != null)
.Where(t => !t.Name.Contains("InlineValidator") && !t.Name.Contains("AbstractValidator"))
.ToList();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment