DataAnnotationsModelValidatorProvider.RegisterDefaultValidatableObjectAdapter Method (Type)
.NET Framework (current version)
Registers an adapter for default object validation.
Assembly: System.Web (in System.Web.dll)
Parameters
- adapterType
-
Type:
System.Type
The type of the adapter.
| Exception | Condition |
|---|---|
| ArgumentNullException | The type parameter is null. |
| ArgumentException | The adapter type does not derive from ModelValidator. |
| ArgumentException | The adapter type does not have a public constructor that accepts two parameters that are typed as ModelMetadata and ModelBindingExecutionContext. |
.NET Framework
Available since 4.5
Available since 4.5
Show: