ModelValidator.GetModelValidator 方法

定义

返回模型的复合模型验证程序。

public:
 static System::Web::ModelBinding::ModelValidator ^ GetModelValidator(System::Web::ModelBinding::ModelMetadata ^ metadata, System::Web::ModelBinding::ModelBindingExecutionContext ^ context);
public static System.Web.ModelBinding.ModelValidator GetModelValidator (System.Web.ModelBinding.ModelMetadata metadata, System.Web.ModelBinding.ModelBindingExecutionContext context);
static member GetModelValidator : System.Web.ModelBinding.ModelMetadata * System.Web.ModelBinding.ModelBindingExecutionContext -> System.Web.ModelBinding.ModelValidator
Public Shared Function GetModelValidator (metadata As ModelMetadata, context As ModelBindingExecutionContext) As ModelValidator

参数

metadata
ModelMetadata

元数据。

context
ModelBindingExecutionContext

该执行上下文。

返回

ModelValidator

模型的复合模型验证程序。

适用于