GetValidators Method (ModelMetadata, ControllerContext, IEnumerable(Attribute))
Collapse the table of content
Expand the table of content

AssociatedValidatorProvider.GetValidators Method (ModelMetadata, ControllerContext, IEnumerable(Of Attribute))

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

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

'Declaration
Protected MustOverride Function GetValidators ( _
	metadata As ModelMetadata, _
	context As ControllerContext, _
	attributes As IEnumerable(Of Attribute) _
) As IEnumerable(Of ModelValidator)
'Usage
Dim metadata As ModelMetadata 
Dim context As ControllerContext 
Dim attributes As IEnumerable(Of Attribute)
Dim returnValue As IEnumerable(Of ModelValidator)

returnValue = Me.GetValidators(metadata, _
	context, attributes)

Parameters

metadata
Type: System.Web.Mvc.ModelMetadata

The metadata.

context
Type: System.Web.Mvc.ControllerContext

The controller context.

attributes
Type: System.Collections.Generic.IEnumerable(Of Attribute)

The list of attributes.

Return Value

Type: System.Collections.Generic.IEnumerable(Of ModelValidator)
The validators for the model.
Show:
© 2016 Microsoft