IValidatableObject.Validate(ValidationContext) 方法

定义

确定指定的对象是否有效。

public:
 System::Collections::Generic::IEnumerable<System::ComponentModel::DataAnnotations::ValidationResult ^> ^ Validate(System::ComponentModel::DataAnnotations::ValidationContext ^ validationContext);
public System.Collections.Generic.IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> Validate (System.ComponentModel.DataAnnotations.ValidationContext validationContext);
abstract member Validate : System.ComponentModel.DataAnnotations.ValidationContext -> seq<System.ComponentModel.DataAnnotations.ValidationResult>
Public Function Validate (validationContext As ValidationContext) As IEnumerable(Of ValidationResult)

参数

validationContext
ValidationContext

验证上下文。

返回

包含失败的验证信息的集合。

适用于