AssociatedValidatorProvider.GetValidators Method (ModelMetadata, ModelBindingExecutionContext)

.NET Framework (current version)
 

Gets the validators for the model using the specified metadata and execution context.

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

override GetValidators : 
        metadata:ModelMetadata *
        context:ModelBindingExecutionContext -> IEnumerable<ModelValidator>

Parameters

metadata
Type: System.Web.ModelBinding.ModelMetadata

The metadata.

context
Type: System.Web.ModelBinding.ModelBindingExecutionContext

The execution context.

Return Value

Type: System.Collections.Generic.IEnumerable<ModelValidator>

The validators.

Exception Condition
ArgumentNullException

The metadata or context parameter is null.

ArgumentException

The property name in the metadata does not refer to one of the properties of the container type.

.NET Framework
Available since 4.5
Return to top
Show: