共用方式為


DataAnnotationsModelValidator<TAttribute> 建構函式

定義

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

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

參數

metadata
ModelMetadata

中繼資料。

context
ModelBindingExecutionContext

執行內容。

attribute
TAttribute

驗證屬性。

適用於