ModelValidatorProviderCollection.GetValidators 方法

定义

返回验证程序的集合。

public:
 System::Collections::Generic::IEnumerable<System::Web::ModelBinding::ModelValidator ^> ^ GetValidators(System::Web::ModelBinding::ModelMetadata ^ metadata, System::Web::ModelBinding::ModelBindingExecutionContext ^ context);
public System.Collections.Generic.IEnumerable<System.Web.ModelBinding.ModelValidator> GetValidators (System.Web.ModelBinding.ModelMetadata metadata, System.Web.ModelBinding.ModelBindingExecutionContext context);
member this.GetValidators : System.Web.ModelBinding.ModelMetadata * System.Web.ModelBinding.ModelBindingExecutionContext -> seq<System.Web.ModelBinding.ModelValidator>
Public Function GetValidators (metadata As ModelMetadata, context As ModelBindingExecutionContext) As IEnumerable(Of ModelValidator)

参数

metadata
ModelMetadata

元数据。

context
ModelBindingExecutionContext

该执行上下文。

返回

IEnumerable<ModelValidator>

验证程序。

适用于