ValidationExtensions.Validate Method (HtmlHelper, String)

 

Retrieves the validation metadata for the specified model and applies each rule to the data field.

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

No code example is currently available or this language may not be supported.

Parameters

htmlHelper
Type: System.Web.Mvc.HtmlHelper

The HTML helper instance that this method extends.

modelName
Type: System.String

The name of the property or model object that is being validated.

Exception Condition
ArgumentNullException

The modelName parameter is null.

Client validation must be enabled.

Return to top
Show: