Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions docs/guide/handlers/fluent-validation.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,12 @@ There is also an HTTP specific middleware for WolverineFx.Http that uses the `Pr
[Fluent Validation Middleware for HTTP](/guide/http/fluentvalidation) for more information.
:::

::: warning
If you need to use IoC services in a Fluent Validation `IValidator` that might force Wolverine to use a service locator
pattern in the generated code (basically from `AddScoped<T>(s => build it at runtime)`), we recommend instead using a
more explicit `Validate` or `ValidateAsync()` method directly in your message handler~~~~ class for the data input.
:::

You will frequently want or need to validate the messages coming into your Wolverine system for correctness
or at least the presence of vital information. To that end, Wolverine has support for integrating the
popular [Fluent Validation](https://docs.fluentvalidation.net/en/latest/) library via an unobtrusive middleware strategy
Expand Down
6 changes: 6 additions & 0 deletions docs/guide/http/fluentvalidation.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Fluent Validation Middleware for HTTP

::: warning
If you need to use IoC services in a Fluent Validation `IValidator` that might force Wolverine to use a service locator
pattern in the generated code (basically from `AddScoped<T>(s => build it at runtime)`), we recommend instead using a
more explicit `Validate` or `ValidateAsync()` method directly in your HTTP endpoint class for the data input.
:::

Wolverine.Http has a separate package called `WolverineFx.Http.FluentValidation` that provides a simple middleware
for using [Fluent Validation](https://docs.fluentvalidation.net/en/latest/) in your HTTP endpoints.

Expand Down
Loading