DataAnnotationsModelValidatorProvider.RegisterDefaultValidatableObjectAdapter Method (Type)

.NET Framework (current version)
 

Registers an adapter for default object validation.

Namespace:   System.Web.ModelBinding
Assembly:  System.Web (in System.Web.dll)

Public Shared Sub RegisterDefaultValidatableObjectAdapter (
	adapterType As Type
)

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
Return to top
Show: