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
)

Parameters

metadata
Type: System.Web.Mvc.ModelMetadata

The model metadata.

context
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
Show: