DefaultHtmlGenerator.AddValidationAttributes 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.
Adds validation attributes to the tagBuilder
if client validation
is enabled.
protected:
virtual void AddValidationAttributes(Microsoft::AspNetCore::Mvc::Rendering::ViewContext ^ viewContext, Microsoft::AspNetCore::Mvc::Rendering::TagBuilder ^ tagBuilder, Microsoft::AspNetCore::Mvc::ViewFeatures::ModelExplorer ^ modelExplorer, System::String ^ expression);
protected virtual void AddValidationAttributes (Microsoft.AspNetCore.Mvc.Rendering.ViewContext viewContext, Microsoft.AspNetCore.Mvc.Rendering.TagBuilder tagBuilder, Microsoft.AspNetCore.Mvc.ViewFeatures.ModelExplorer modelExplorer, string expression);
abstract member AddValidationAttributes : Microsoft.AspNetCore.Mvc.Rendering.ViewContext * Microsoft.AspNetCore.Mvc.Rendering.TagBuilder * Microsoft.AspNetCore.Mvc.ViewFeatures.ModelExplorer * string -> unit
override this.AddValidationAttributes : Microsoft.AspNetCore.Mvc.Rendering.ViewContext * Microsoft.AspNetCore.Mvc.Rendering.TagBuilder * Microsoft.AspNetCore.Mvc.ViewFeatures.ModelExplorer * string -> unit
Protected Overridable Sub AddValidationAttributes (viewContext As ViewContext, tagBuilder As TagBuilder, modelExplorer As ModelExplorer, expression As String)
Parameters
- viewContext
- ViewContext
A ViewContext instance for the current scope.
- tagBuilder
- TagBuilder
A TagBuilder instance.
- modelExplorer
- ModelExplorer
The ModelExplorer for the expression
.
- expression
- String
Expression name, relative to the current model.