CustomValidationAttribute(Type, String) 构造函数

定义

初始化 CustomValidationAttribute 类的新实例。Initializes a new instance of the CustomValidationAttribute class.

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

包含执行自定义验证的方法的类型。The type that contains the method that performs custom validation.

method
String

执行自定义验证的方法。The method that performs custom validation.

注解

此方法指定要在运行时调用的自定义类和相关方法,以便执行自定义验证逻辑。This method specifies a custom class and a related method to call at run time in order to execute custom validation logic.

适用于