共用方式為


DataAnnotationsModelValidator 建構函式

定義

初始化 DataAnnotationsModelValidator 類別的新執行個體。

public:
 DataAnnotationsModelValidator(System::Web::ModelBinding::ModelMetadata ^ metadata, System::Web::ModelBinding::ModelBindingExecutionContext ^ context, System::ComponentModel::DataAnnotations::ValidationAttribute ^ attribute);
public DataAnnotationsModelValidator (System.Web.ModelBinding.ModelMetadata metadata, System.Web.ModelBinding.ModelBindingExecutionContext context, System.ComponentModel.DataAnnotations.ValidationAttribute attribute);
new System.Web.ModelBinding.DataAnnotationsModelValidator : System.Web.ModelBinding.ModelMetadata * System.Web.ModelBinding.ModelBindingExecutionContext * System.ComponentModel.DataAnnotations.ValidationAttribute -> System.Web.ModelBinding.DataAnnotationsModelValidator
Public Sub New (metadata As ModelMetadata, context As ModelBindingExecutionContext, attribute As ValidationAttribute)

參數

metadata
ModelMetadata

中繼資料。

context
ModelBindingExecutionContext

執行內容。

attribute
ValidationAttribute

驗證屬性。

適用於