Skip to content

Commit 611d3e5

Browse files
committed
Correct type names in docs on Validation in WebFlux
Closes gh-33061
1 parent fa2a58b commit 611d3e5

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

framework-docs/modules/ROOT/pages/web/webflux/controller/ann-validation.adoc

+5-5
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,15 @@ xref:web/webflux/controller/ann-methods/multipart-forms.adoc[@RequestPart] argum
1313
resolvers validate a method argument individually if the method parameter is annotated
1414
with Jakarta `@Valid` or Spring's `@Validated`, _AND_ there is no `Errors` or
1515
`BindingResult` parameter immediately after, _AND_ method validation is not needed (to be
16-
discussed next). The exception raised in this case is `MethodArgumentNotValidException`.
16+
discussed next). The exception raised in this case is `WebExchangeBindException`.
1717

1818
2. When `@Constraint` annotations such as `@Min`, `@NotBlank` and others are declared
1919
directly on method parameters, or on the method (for the return value), then method
2020
validation must be applied, and that supersedes validation at the method argument level
2121
because method validation covers both method parameter constraints and nested constraints
2222
via `@Valid`. The exception raised in this case is `HandlerMethodValidationException`.
2323

24-
Applications must handle both `MethodArgumentNotValidException` and
24+
Applications must handle both `WebExchangeBindException` and
2525
`HandlerMethodValidationException` as either may be raised depending on the controller
2626
method signature. The two exceptions, however are designed to be very similar, and can be
2727
handled with almost identical code. The main difference is that the former is for a single
@@ -39,7 +39,7 @@ method parameters with an `Errors` immediately after. If there are validation er
3939
any other method parameter then `HandlerMethodValidationException` is raised.
4040

4141
You can configure a `Validator` globally through the
42-
xref:web/webflux/config.adoc#webflux-config-validation[WebMvc config], or locally
42+
xref:web/webflux/config.adoc#webflux-config-validation[WebFlux config], or locally
4343
through an xref:web/webflux/controller/ann-initbinder.adoc[@InitBinder] method in an
4444
`@Controller` or `@ControllerAdvice`. You can also use multiple validators.
4545

@@ -49,8 +49,8 @@ through an AOP proxy. In order to take advantage of the Spring MVC built-in supp
4949
method validation added in Spring Framework 6.1, you need to remove the class level
5050
`@Validated` annotation from the controller.
5151

52-
The xref:web/webmvc/mvc-ann-rest-exceptions.adoc[Error Responses] section provides further
53-
details on how `MethodArgumentNotValidException` and `HandlerMethodValidationException`
52+
The xref:web/webflux/ann-rest-exceptions.adoc[Error Responses] section provides further
53+
details on how `WebExchangeBindException` and `HandlerMethodValidationException`
5454
are handled, and also how their rendering can be customized through a `MessageSource` and
5555
locale and language specific resource bundles.
5656

0 commit comments

Comments
 (0)