BaseValidator.Validate 方法

定义

对关联的输入控件执行验证并更新 IsValid 属性。Performs validation on the associated input control and updates the IsValid property.

public:
 virtual void Validate();
public void Validate ();
abstract member Validate : unit -> unit
override this.Validate : unit -> unit
Public Sub Validate ()

实现

示例

有关派生类中使用的 Validate 方法的示例,请参阅 CompareValidator 类概述。For an example of the Validate method used in a derived class, see the CompareValidator class overview.

注解

使用 Validate 方法对关联的输入控件执行验证。Use the Validate method to perform validation on the associated input control. 此方法允许你以编程方式对输入控件执行验证。This method allows you to programmatically perform validation on the input control. IsValid 属性会自动更新为验证结果。The IsValid property is automatically updated with the validation results.

适用于

另请参阅