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

執行自訂驗證的方法。

備註

這個方法會指定要在執行時間呼叫的自訂類別和相關方法,以執行自訂驗證邏輯。

適用於