HtmlHelper.ValidationSummary(Boolean, String, Object, 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.
Returns an unordered list (<ul> element) of validation messages that are in the ModelStateDictionary object.
public:
virtual Microsoft::AspNetCore::Html::IHtmlContent ^ ValidationSummary(bool excludePropertyErrors, System::String ^ message, System::Object ^ htmlAttributes, System::String ^ tag);
public Microsoft.AspNetCore.Html.IHtmlContent ValidationSummary (bool excludePropertyErrors, string message, object htmlAttributes, string tag);
abstract member ValidationSummary : bool * string * obj * string -> Microsoft.AspNetCore.Html.IHtmlContent
override this.ValidationSummary : bool * string * obj * string -> Microsoft.AspNetCore.Html.IHtmlContent
Public Function ValidationSummary (excludePropertyErrors As Boolean, message As String, htmlAttributes As Object, tag As String) As IHtmlContent
Parameters
- 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.
- 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.