Table of Contents

Class AssociatedValidatorProvider

Namespace
System.Web.Mvc
Assembly
System.Web.Mvc.dll

Provides an abstract class for classes that implement a validation provider.

public abstract class AssociatedValidatorProvider : ModelValidatorProvider
Inheritance
AssociatedValidatorProvider
Derived
Inherited Members

Constructors

AssociatedValidatorProvider()

Called from constructors in derived classes to initialize the AssociatedMetadataProvider class.

protected AssociatedValidatorProvider()

Methods

GetTypeDescriptor(Type)

Gets a type descriptor for the specified type.

protected virtual ICustomTypeDescriptor GetTypeDescriptor(Type type)

Parameters

type Type

The type of the validation provider.

Returns

ICustomTypeDescriptor

A type descriptor for the specified type.

GetValidators(ModelMetadata, ControllerContext)

Gets the validators for the model using the metadata and controller context.

public override sealed IEnumerable<ModelValidator> GetValidators(ModelMetadata metadata, ControllerContext context)

Parameters

metadata ModelMetadata

The metadata.

context ControllerContext

The controller context.

Returns

IEnumerable<ModelValidator>

The validators for the model.

GetValidators(ModelMetadata, ControllerContext, IEnumerable<Attribute>)

Gets the validators for the model using the metadata, the controller context, and a list of attributes.

protected abstract IEnumerable<ModelValidator> GetValidators(ModelMetadata metadata, ControllerContext context, IEnumerable<Attribute> attributes)

Parameters

metadata ModelMetadata

The metadata.

context ControllerContext

The controller context.

attributes IEnumerable<Attribute>

The list of attributes.

Returns

IEnumerable<ModelValidator>

The validators for the model.