title: How to give validation summary for specific models in MVC?
body: <p>Creating Form in MVC. trying to add validation summary in form.</p>
  
  <p>but it shows validation for all fields.</p>
  
  <p>How to show specific validation summary with asterisk sign?</p>
  
  <p><strong>View</strong></p>
  
  <pre><code> &lt;div class="col-md-12 table-bordered" style="padding: 20px; margin:10px;"&gt;
      &lt;div class="col-md-12"&gt;@Html.ValidationSummary(false, "", new { @class = "text-danger" })&lt;/div&gt;
      &lt;div class="col-md-12" style="padding:10px;"&gt;
          &lt;div class="col-md-6"&gt;
              &lt;div style="width:95%;"&gt;
                  @Html.LabelFor(Model =&gt; Model.ItemName, new { style = "font-weight:bold;", @maxlength = "100" })
                  @Html.TextBoxFor(Model =&gt; Model.ItemName)
                  &lt;span class="text-danger"&gt; @Html.ValidationMessageFor(Model =&gt; Model.ItemName) &lt;/span&gt;
              &lt;/div&gt;
          &lt;/div&gt;
          &lt;div class="col-md-6"&gt;
              &lt;div style="width:75%;"&gt;
                  @Html.LabelFor(Model =&gt; Model.ActiveProductGroup, new { style = "font-weight:bold;" })
                  @Html.DropDownListFor(Model =&gt; Model.ProductGroupID, new SelectList(ViewBag.ActiveProductGroup, "Value", "Text"), "--Select Value--", new { style = "Width:95%" })
                  &lt;span class="text-danger"&gt; @Html.ValidationMessageFor(Model =&gt; Model.ActiveProductGroup) &lt;/span&gt;
              &lt;/div&gt;
          &lt;/div&gt;
      &lt;/div&gt;
      &lt;div class="col-md-12" style="padding:10px;"&gt;
          &lt;div class="col-md-3"&gt;
              &lt;div style="width:70%;"&gt;
                  @Html.LabelFor(Model =&gt; Model.SequenceNumber, new { style = "font-weight:bold;" })
                  @Html.TextBoxFor(Model =&gt; Model.SequenceNumber, new { style = "text-align:right", Value = "", @maxlength = "3" })
                  &lt;span class="text-danger"&gt; @Html.ValidationMessageFor(Model =&gt; Model.SequenceNumber) &lt;/span&gt;
              &lt;/div&gt;
          &lt;/div&gt;
          &lt;div class="col-md-3"&gt;
              &lt;div style="width:50%;"&gt;
                  @Html.LabelFor(Model =&gt; Model.UnitPrice, new { style = "font-weight:bold;" })
                  @Html.TextBoxFor(Model =&gt; Model.UnitPrice, new { style = "text-align:right", Value = "", @maxlength = "5" })
                  &lt;span class="text-danger"&gt; @Html.ValidationMessageFor(Model =&gt; Model.UnitPrice) &lt;/span&gt;
              &lt;/div&gt;
          &lt;/div&gt;
          &lt;div class="col-md-3"&gt;
              &lt;div style="width:50%;"&gt;
                  @Html.LabelFor(Model =&gt; Model.Quantity, new { style = "font-weight:bold;" })
                  @Html.TextBoxFor(Model =&gt; Model.Quantity, new { style = "text-align:right", Value = "", @maxlength = "5" })
                  &lt;span class="text-danger"&gt; @Html.ValidationMessageFor(Model =&gt; Model.Quantity) &lt;/span&gt;
              &lt;/div&gt;
          &lt;/div&gt;
          &lt;div class="col-md-3"&gt;
              &lt;div style="width:80%;"&gt;
                  @Html.LabelFor(Model =&gt; Model.EstimatedDeliveryDays, new { style = "font-weight:bold;" })
                  @Html.TextBoxFor(Model =&gt; Model.EstimatedDeliveryDays, new { style = "text-align:right", Value = "", @maxlength = "2" })
                  &lt;span class="text-danger"&gt; @Html.ValidationMessageFor(Model =&gt; Model.EstimatedDeliveryDays) &lt;/span&gt;
              &lt;/div&gt;
          &lt;/div&gt;
      &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p><strong>Screenshot</strong></p>
  
  <p><a href="https://i.stack.imgur.com/JJeSX.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/JJeSX.png" alt="enter image description here"></a></p>
  
  <blockquote>
    <p>Models:-
    <a href="https://i.stack.imgur.com/Z0SZz.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Z0SZz.png" alt="enter image description here"></a></p>
  </blockquote>
  
  <ul>
  <li><p>Want validation summary only for Item Name, Quantity, unit Price and
  product Group dropdown</p></li>
  <li><p>Is it possible to get validation summary of specific models?</p></li>
  </ul>