Delen via


DataAnnotationsModelValidator.Validate(Object) Method

Definition

Returns a list of validation error messages for the model.

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

Parameters

container
Object

The container for the model.

Returns

A list of validation error messages for the model, or an empty list if no errors have occurred.

Applies to