Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
GetValidators Method (ModelMetadata, ControllerContext, IEnumerable(Attribute))
Collapse the table of content
Expand the table of content

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

Gets a list of validators.

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

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

Parameters

metadata
Type: System.Web.Mvc.ModelMetadata

The metadata.

context
Type: System.Web.Mvc.ControllerContext

The context.

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

The list of validation attributes.

Return Value

Type: System.Collections.Generic.IEnumerable<ModelValidator>
A list of validators.
Show:
© 2015 Microsoft