You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+9-3Lines changed: 9 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -138,9 +138,15 @@ The `[AutoValidateNever]` attribute can be placed on a controller class, control
138
138
139
139
**Note:** Using validation interceptors is considered to be an advanced feature and is not needed for most use cases.
140
140
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:
0 commit comments