DataAnnotationsModelValidatorProvider.RegisterValidatableObjectAdapterFactory Method (Type, DataAnnotationsValidatableObjectAdapterFactory)
.NET Framework (current version)
Registers an adapter factory for the object validation provider.
Assembly: System.Web (in System.Web.dll)
Public Shared Sub RegisterValidatableObjectAdapterFactory ( modelType As Type, factory As DataAnnotationsValidatableObjectAdapterFactory )
Parameters
- modelType
-
Type:
System.Type
The type of the model.
- factory
-
Type:
System.Web.ModelBinding.DataAnnotationsValidatableObjectAdapterFactory
The factory.
| Exception | Condition |
|---|---|
| ArgumentNullException | The factory or type parameter is null. |
| ArgumentException | The model type does not implement the IValidatableObject interface. |
.NET Framework
Available since 4.5
Available since 4.5
Show: