HtmlHelperValidationExtensions.ValidationSummary Method

Definition

Overloads

ValidationSummary(IHtmlHelper, Boolean, String, String)

Returns an unordered list (<ul> element) of validation messages that are in the ModelStateDictionary object.

ValidationSummary(IHtmlHelper)

Returns an unordered list (<ul> element) of validation messages that are in the ModelStateDictionary object.

ValidationSummary(IHtmlHelper, Boolean)

Returns an unordered list (<ul> element) of validation messages that are in the ModelStateDictionary object.

ValidationSummary(IHtmlHelper, String)

Returns an unordered list (<ul> element) of validation messages that are in the ModelStateDictionary object.

ValidationSummary(IHtmlHelper, Boolean, String)

Returns an unordered list (<ul> element) of validation messages that are in the ModelStateDictionary object.

ValidationSummary(IHtmlHelper, String, Object)

Returns an unordered list (<ul> element) of validation messages that are in the ModelStateDictionary object.

ValidationSummary(IHtmlHelper, String, String)

Returns an unordered list (<ul> element) of validation messages that are in the ModelStateDictionary object.

ValidationSummary(IHtmlHelper, Boolean, String, Object)

Returns an unordered list (<ul> element) of validation messages that are in the ModelStateDictionary object.

ValidationSummary(IHtmlHelper, String, Object, String)

Returns an unordered list (<ul> element) of validation messages that are in the ModelStateDictionary object.

ValidationSummary(IHtmlHelper, Boolean, String, String)

Source:
HtmlHelperValidationExtensions.cs
Source:
HtmlHelperValidationExtensions.cs
Source:
HtmlHelperValidationExtensions.cs

Returns an unordered list (<ul> element) of validation messages that are in the ModelStateDictionary object.

C#
public static Microsoft.AspNetCore.Html.IHtmlContent ValidationSummary (this Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper htmlHelper, bool excludePropertyErrors, string message, string tag);

Parameters

htmlHelper
IHtmlHelper

The IHtmlHelper instance this method extends.

excludePropertyErrors
Boolean

If true, display model-level errors only; otherwise display all errors.

message
String

The message to display with the validation summary.

tag
String

The tag to wrap the message in the generated HTML. Its default value is ValidationSummaryMessageElement.

Returns

New IHtmlContent containing a <div> element wrapping the tag element and the <ul> element. An empty IHtmlContent if the current model is valid and client-side validation is disabled.

Applies to

ASP.NET Core 9.0 and other versions
Product Versions
ASP.NET Core 1.0, 1.1, 2.0, 2.1, 2.2, 3.0, 3.1, 5.0, 6.0, 7.0, 8.0, 9.0

ValidationSummary(IHtmlHelper)

Source:
HtmlHelperValidationExtensions.cs
Source:
HtmlHelperValidationExtensions.cs
Source:
HtmlHelperValidationExtensions.cs

Returns an unordered list (<ul> element) of validation messages that are in the ModelStateDictionary object.

C#
public static Microsoft.AspNetCore.Html.IHtmlContent ValidationSummary (this Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper htmlHelper);

Parameters

htmlHelper
IHtmlHelper

The IHtmlHelper instance this method extends.

Returns

New IHtmlContent containing a <div> element wrapping the <ul> element. An empty IHtmlContent if the current model is valid and client-side validation is disabled.

Applies to

ASP.NET Core 9.0 and other versions
Product Versions
ASP.NET Core 1.0, 1.1, 2.0, 2.1, 2.2, 3.0, 3.1, 5.0, 6.0, 7.0, 8.0, 9.0

ValidationSummary(IHtmlHelper, Boolean)

Source:
HtmlHelperValidationExtensions.cs
Source:
HtmlHelperValidationExtensions.cs
Source:
HtmlHelperValidationExtensions.cs

Returns an unordered list (<ul> element) of validation messages that are in the ModelStateDictionary object.

C#
public static Microsoft.AspNetCore.Html.IHtmlContent ValidationSummary (this Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper htmlHelper, bool excludePropertyErrors);

Parameters

htmlHelper
IHtmlHelper

The IHtmlHelper instance this method extends.

excludePropertyErrors
Boolean

If true, display model-level errors only; otherwise display all errors.

Returns

New IHtmlContent containing a <div> element wrapping the <ul> element. An empty IHtmlContent if the current model is valid and client-side validation is disabled.

Applies to

ASP.NET Core 9.0 and other versions
Product Versions
ASP.NET Core 1.0, 1.1, 2.0, 2.1, 2.2, 3.0, 3.1, 5.0, 6.0, 7.0, 8.0, 9.0

ValidationSummary(IHtmlHelper, String)

Source:
HtmlHelperValidationExtensions.cs
Source:
HtmlHelperValidationExtensions.cs
Source:
HtmlHelperValidationExtensions.cs

Returns an unordered list (<ul> element) of validation messages that are in the ModelStateDictionary object.

C#
public static Microsoft.AspNetCore.Html.IHtmlContent ValidationSummary (this Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper htmlHelper, string message);

Parameters

htmlHelper
IHtmlHelper

The IHtmlHelper instance this method extends.

message
String

The message to display with the validation summary.

Returns

New IHtmlContent containing a <div> element wrapping the ValidationSummaryMessageElement element (which wraps the message) and the <ul> element. An empty IHtmlContent if the current model is valid and client-side validation is disabled.

Applies to

ASP.NET Core 9.0 and other versions
Product Versions
ASP.NET Core 1.0, 1.1, 2.0, 2.1, 2.2, 3.0, 3.1, 5.0, 6.0, 7.0, 8.0, 9.0

ValidationSummary(IHtmlHelper, Boolean, String)

Source:
HtmlHelperValidationExtensions.cs
Source:
HtmlHelperValidationExtensions.cs
Source:
HtmlHelperValidationExtensions.cs

Returns an unordered list (<ul> element) of validation messages that are in the ModelStateDictionary object.

C#
public static Microsoft.AspNetCore.Html.IHtmlContent ValidationSummary (this Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper htmlHelper, bool excludePropertyErrors, string message);

Parameters

htmlHelper
IHtmlHelper

The IHtmlHelper instance this method extends.

excludePropertyErrors
Boolean

If true, display model-level errors only; otherwise display all errors.

message
String

The message to display with the validation summary.

Returns

New IHtmlContent containing a <div> element wrapping the ValidationSummaryMessageElement element (which, in turn, wraps the message) and the <ul> element. An empty IHtmlContent if the current model is valid and client-side validation is disabled.

Applies to

ASP.NET Core 9.0 and other versions
Product Versions
ASP.NET Core 1.0, 1.1, 2.0, 2.1, 2.2, 3.0, 3.1, 5.0, 6.0, 7.0, 8.0, 9.0

ValidationSummary(IHtmlHelper, String, Object)

Source:
HtmlHelperValidationExtensions.cs
Source:
HtmlHelperValidationExtensions.cs
Source:
HtmlHelperValidationExtensions.cs

Returns an unordered list (<ul> element) of validation messages that are in the ModelStateDictionary object.

C#
public static Microsoft.AspNetCore.Html.IHtmlContent ValidationSummary (this Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper htmlHelper, string message, object htmlAttributes);

Parameters

htmlHelper
IHtmlHelper

The IHtmlHelper instance this method extends.

message
String

The message to display with the validation summary.

htmlAttributes
Object

An Object that contains the HTML attributes for the topmost (<div>) element. Alternatively, an IDictionary<TKey,TValue> instance containing the HTML attributes.

Returns

New IHtmlContent containing a <div> element wrapping the ValidationSummaryMessageElement element (which wraps the message) and the <ul> element. An empty IHtmlContent if the current model is valid and client-side validation is disabled.

Applies to

ASP.NET Core 9.0 and other versions
Product Versions
ASP.NET Core 1.0, 1.1, 2.0, 2.1, 2.2, 3.0, 3.1, 5.0, 6.0, 7.0, 8.0, 9.0

ValidationSummary(IHtmlHelper, String, String)

Source:
HtmlHelperValidationExtensions.cs
Source:
HtmlHelperValidationExtensions.cs
Source:
HtmlHelperValidationExtensions.cs

Returns an unordered list (<ul> element) of validation messages that are in the ModelStateDictionary object.

C#
public static Microsoft.AspNetCore.Html.IHtmlContent ValidationSummary (this Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper htmlHelper, string message, string tag);

Parameters

htmlHelper
IHtmlHelper

The IHtmlHelper instance this method extends.

message
String

The message to display with the validation summary.

tag
String

The tag to wrap the message in the generated HTML. Its default value is ValidationSummaryMessageElement.

Returns

New IHtmlContent containing a <div> element wrapping the tag element and the <ul> element. An empty IHtmlContent if the current model is valid and client-side validation is disabled.

Applies to

ASP.NET Core 9.0 and other versions
Product Versions
ASP.NET Core 1.0, 1.1, 2.0, 2.1, 2.2, 3.0, 3.1, 5.0, 6.0, 7.0, 8.0, 9.0

ValidationSummary(IHtmlHelper, Boolean, String, Object)

Source:
HtmlHelperValidationExtensions.cs
Source:
HtmlHelperValidationExtensions.cs
Source:
HtmlHelperValidationExtensions.cs

Returns an unordered list (<ul> element) of validation messages that are in the ModelStateDictionary object.

C#
public static Microsoft.AspNetCore.Html.IHtmlContent ValidationSummary (this Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper htmlHelper, bool excludePropertyErrors, string message, object htmlAttributes);

Parameters

htmlHelper
IHtmlHelper

The IHtmlHelper instance this method extends.

excludePropertyErrors
Boolean

If true, display model-level errors only; otherwise display all errors.

message
String

The message to display with the validation summary.

htmlAttributes
Object

An Object that contains the HTML attributes for the topmost (<div>) element. Alternatively, an IDictionary<TKey,TValue> instance containing the HTML attributes.

Returns

New IHtmlContent containing a <div> element wrapping the ValidationSummaryMessageElement element (which wraps the message) and the <ul> element. An empty IHtmlContent if the current model is valid and client-side validation is disabled.

Applies to

ASP.NET Core 9.0 and other versions
Product Versions
ASP.NET Core 1.0, 1.1, 2.0, 2.1, 2.2, 3.0, 3.1, 5.0, 6.0, 7.0, 8.0, 9.0

ValidationSummary(IHtmlHelper, String, Object, String)

Source:
HtmlHelperValidationExtensions.cs
Source:
HtmlHelperValidationExtensions.cs
Source:
HtmlHelperValidationExtensions.cs

Returns an unordered list (<ul> element) of validation messages that are in the ModelStateDictionary object.

C#
public static Microsoft.AspNetCore.Html.IHtmlContent ValidationSummary (this Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper htmlHelper, string message, object htmlAttributes, string tag);

Parameters

htmlHelper
IHtmlHelper

The IHtmlHelper instance this method extends.

message
String

The message to display with the validation summary.

htmlAttributes
Object

An Object that contains the HTML attributes for the topmost (<div>) element. Alternatively, an IDictionary<TKey,TValue> instance containing the HTML attributes.

tag
String

The tag to wrap the message in the generated HTML. Its default value is ValidationSummaryMessageElement.

Returns

New IHtmlContent containing a <div> element wrapping the tag element and the <ul> element. An empty IHtmlContent if the current model is valid and client-side validation is disabled.

Applies to

ASP.NET Core 9.0 and other versions
Product Versions
ASP.NET Core 1.0, 1.1, 2.0, 2.1, 2.2, 3.0, 3.1, 5.0, 6.0, 7.0, 8.0, 9.0