DataAnnotationsModelValidatorProvider.GetValidators Method (ModelMetadata, ModelBindingExecutionContext, IEnumerable<Attribute>)

.NET Framework (current version)
 

Gets a collection of validators for the model.

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

protected override IEnumerable<ModelValidator> GetValidators(
	ModelMetadata metadata,
	ModelBindingExecutionContext context,
	IEnumerable<Attribute> attributes
)

Parameters

metadata
Type: System.Web.ModelBinding.ModelMetadata

The metadata.

context
Type: System.Web.ModelBinding.ModelBindingExecutionContext

The execution context.

attributes
Type: System.Collections.Generic.IEnumerable<Attribute>

The validation attributes.

Return Value

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

The collection of validators.

.NET Framework
Available since 4.5
Return to top
Show: