Skip to content

Commit f4dc05a

Browse files
committed
improve validation interceptor documentation
1 parent fdf12f7 commit f4dc05a

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

README.md

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -138,9 +138,15 @@ The `[AutoValidateNever]` attribute can be placed on a controller class, control
138138

139139
**Note:** Using validation interceptors is considered to be an advanced feature and is not needed for most use cases.
140140

141-
Validation interceptors allow you to intercept and alter the validation process by either implementing the `IGlobalValidationInterceptor` interface in a custom class or by implementing
142-
the `IValidatorInterceptor` on a single validator.
143-
During the validation process both instances get resolved and called (if they are present) creating a mini pipeline of validation interceptors:
141+
Validation interceptors provide a mechanism for intercepting and modifying the validation process. This can be achieved through two distinct approaches:
142+
143+
Global validation interceptor:
144+
Create a custom class that implements the `IGlobalValidationInterceptor` interface and register it with the service provider.
145+
146+
Per validator interceptor:
147+
Implement the `IValidatorInterceptor` interface directly on a specific validator.
148+
149+
In the validation process, both the global and the validator interceptors are resolved and invoked (if they exist), thereby establishing a miniature pipeline of validation interceptors:
144150

145151
```
146152
==> IValidatorInterceptor.BeforeValidation()

0 commit comments

Comments
 (0)