DataAnnotationsModelValidator.Validate(Object) 方法

定义

返回模型的验证错误消息的列表。

public:
 override System::Collections::Generic::IEnumerable<System::Web::ModelBinding::ModelValidationResult ^> ^ Validate(System::Object ^ container);
public override System.Collections.Generic.IEnumerable<System.Web.ModelBinding.ModelValidationResult> Validate (object container);
override this.Validate : obj -> seq<System.Web.ModelBinding.ModelValidationResult>
Public Overrides Function Validate (container As Object) As IEnumerable(Of ModelValidationResult)
Public Iterator Overrides Function Validate (container As Object) As IEnumerable(Of ModelValidationResult)

参数

container
Object

模型的容器。

返回

IEnumerable<ModelValidationResult>

验证错误消息的列表,如果错误未找到,则为空列表。

适用于