IHtmlHelper.ValidationSummary(Boolean, String, Object, String) Méthode

Définition

Retourne une liste non triée (<élément ul> ) des messages de validation qui se trouvent dans l’objet ModelStateDictionary .

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

Paramètres

excludePropertyErrors
Boolean

Si true, affichez uniquement les erreurs au niveau du modèle ; sinon, affichez toutes les erreurs.

message
String

Message à afficher avec le résumé des validations.

htmlAttributes
Object

Object qui contient les attributs HTML de l’élément le plus haut (<div>). IDictionary<TKey,TValue> Une instance contenant les attributs HTML.

tag
String

Balise pour encapsuler le message dans le code HTML généré. Sa valeur par défaut est ValidationSummaryMessageElement.

Retours

Nouveau IHtmlContent contenant un <élément div> encapsulant l’élément tag et l’élément <ul> . Vide IHtmlContent si le modèle actuel est valide et si la validation côté client est désactivée.

S’applique à