ValidationExtensions.Validate(HtmlHelper, String) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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
<Extension()>
Public Sub Validate (htmlHelper As HtmlHelper, modelName As String)
Parameters
- htmlHelper
- HtmlHelper
The HTML helper instance that this method extends.
- modelName
- String
The name of the property or model object that is being validated.
Exceptions
The modelName
parameter is null.