Freigeben über


AssociatedValidatorProvider.GetValidators Method (ModelMetadata, ControllerContext, IEnumerable<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)

Syntax

'Declaration
Protected MustOverride Function GetValidators ( _
    metadata As ModelMetadata, _
    context As ControllerContext, _
    attributes As IEnumerable(Of Attribute) _
) As IEnumerable(Of ModelValidator)
protected abstract IEnumerable<ModelValidator> GetValidators(
    ModelMetadata metadata,
    ControllerContext context,
    IEnumerable<Attribute> attributes
)
protected:
virtual IEnumerable<ModelValidator^>^ GetValidators(
    ModelMetadata^ metadata, 
    ControllerContext^ context, 
    IEnumerable<Attribute^>^ attributes
) abstract

Parameters

Return Value

Type: System.Collections.Generic.IEnumerable<ModelValidator>
The validators for the model.

See Also

Reference

AssociatedValidatorProvider Class

GetValidators Overload

System.Web.Mvc Namespace