Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

CompareAttribute.GetClientValidationRules Method (ModelMetadata, ControllerContext)


Gets a list of compare-value client validation rules for the property using the specified model metadata and controller context.

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

public IEnumerable<ModelClientValidationRule> GetClientValidationRules(
	ModelMetadata metadata,
	ControllerContext context


Type: System.Web.Mvc.ModelMetadata

The model metadata.

Type: System.Web.Mvc.ControllerContext

The controller context.

Return Value

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

A list of compare-value client validation rules.

Return to top
© 2015 Microsoft