Share via


DataAnnotationsModelValidator.Validate Method (Object)

 

Returns a list of validation error messages for the model.

Namespace:   System.Web.Mvc
Assembly:  System.Web.Mvc (in System.Web.Mvc.dll)

Syntax

public override IEnumerable<ModelValidationResult> Validate(
    object container
)
public:
virtual IEnumerable<ModelValidationResult^>^ Validate(
    Object^ container
) override
override Validate : 
        container:Object -> IEnumerable<ModelValidationResult>
Public Overrides Function Validate (
    container As Object
) As IEnumerable(Of ModelValidationResult)

Parameters

Return Value

Type: System.Collections.Generic.IEnumerable<ModelValidationResult>

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

See Also

DataAnnotationsModelValidator Class
System.Web.Mvc Namespace

Return to top