ValidationExtensions.Validate(HtmlHelper, String) ValidationExtensions.Validate(HtmlHelper, String) Method

Definition

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

public static void Validate (this System.Web.Mvc.HtmlHelper htmlHelper, string modelName);
static member Validate : System.Web.Mvc.HtmlHelper * string -> unit

Parameters

htmlHelper
HtmlHelper HtmlHelper

The HTML helper instance that this method extends.

modelName
String String

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

Exceptions

Applies to