CustomValidationAttribute(Type, String) 建構函式

定義

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

public:
 CustomValidationAttribute(Type ^ validatorType, System::String ^ method);
public CustomValidationAttribute(Type validatorType, string method);
new System.ComponentModel.DataAnnotations.CustomValidationAttribute : Type * string -> System.ComponentModel.DataAnnotations.CustomValidationAttribute
Public Sub New (validatorType As Type, method As String)

參數

validatorType
Type

包含執行自訂驗證的方法的類型。

method
String

執行自訂驗證的方法。

備註

此方法指定一個自訂類別及相關方法,在執行時呼叫以執行自訂驗證邏輯。

適用於