Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Validate Method
Collapse the table of content
Expand the table of content

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)

public override IEnumerable<ModelValidationResult> Validate(
	object container
)

Parameters

container
Type: System.Object

The container for the model.

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.

Return to top
Show:
© 2015 Microsoft