ModelMetadata.GetValidators(ModelBindingExecutionContext) 方法

定义

返回应用于模型的验证程序的集合。

public:
 virtual System::Collections::Generic::IEnumerable<System::Web::ModelBinding::ModelValidator ^> ^ GetValidators(System::Web::ModelBinding::ModelBindingExecutionContext ^ context);
public virtual System.Collections.Generic.IEnumerable<System.Web.ModelBinding.ModelValidator> GetValidators (System.Web.ModelBinding.ModelBindingExecutionContext context);
abstract member GetValidators : System.Web.ModelBinding.ModelBindingExecutionContext -> seq<System.Web.ModelBinding.ModelValidator>
override this.GetValidators : System.Web.ModelBinding.ModelBindingExecutionContext -> seq<System.Web.ModelBinding.ModelValidator>
Public Overridable Function GetValidators (context As ModelBindingExecutionContext) As IEnumerable(Of ModelValidator)

参数

context
ModelBindingExecutionContext

模型绑定器执行上下文。

返回

验证程序的集合。

适用于