CustomValidationAttribute(Type, String) 建構函式
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
初始化 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
執行自訂驗證的方法。
備註
此方法指定一個自訂類別及相關方法,在執行時呼叫以執行自訂驗證邏輯。