IHtmlHelper.ValidationSummary(Boolean, String, Object, String) Metoda

Definicja

Zwraca nieurządkowaną listę (<element ul> ) komunikatów sprawdzania poprawności znajdujących się w ModelStateDictionary obiekcie.

public:
 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
Public Function ValidationSummary (excludePropertyErrors As Boolean, message As String, htmlAttributes As Object, tag As String) As IHtmlContent

Parametry

excludePropertyErrors
Boolean

Jeśli true, wyświetl tylko błędy na poziomie modelu; w przeciwnym razie wyświetl wszystkie błędy.

message
String

Komunikat do wyświetlenia z podsumowaniem walidacji.

htmlAttributes
Object

Element Object zawierający atrybuty HTML dla najbardziej najwyższego elementu (<div>). Alternatywnie IDictionary<TKey,TValue> wystąpienie zawierające atrybuty HTML.

tag
String

Tag do zawijania message w wygenerowany kod HTML. Jego wartością domyślną jest ValidationSummaryMessageElement.

Zwraca

Nowość zawierająca <element div> opakowujący tag element i <element ul>.IHtmlContent IHtmlContent Pusty, jeśli bieżący model jest prawidłowy, a walidacja po stronie klienta jest wyłączona.

Dotyczy