title: How to apply bootstrap v4 form input validation classes with the ASP.NET Razor syntax?
body: <p>The following code:</p>
  
  <p><strong>View:(is-valid)</strong></p>
  
  <pre><code>&lt;div class="form-group"&gt;
      @Html.LabelFor(m =&gt; m.Telefone, new { @class = "font-weight-bold" })
      @Html.TextBoxFor(m =&gt; m.Telefone, new { @class = "form-control is-valid", @placeholder = "Digite seu telefone" })
      @Html.ValidationMessageFor(m =&gt; m.Telefone, "", new { @class = "text-danger" })
  &lt;/div&gt;
  </code></pre>
  
  <p><strong>View:(is-invalid)</strong></p>
  
  <pre><code>&lt;div class="form-group"&gt;
      @Html.LabelFor(m =&gt; m.Telefone, new { @class = "font-weight-bold" })
      @Html.TextBoxFor(m =&gt; m.Telefone, new { @class = "form-control is-invalid", @placeholder = "Digite seu telefone" })
      @Html.ValidationMessageFor(m =&gt; m.Telefone, "", new { @class = "text-danger" })
  &lt;/div&gt;
  </code></pre>
  
  <p>Example: <a href="https://getbootstrap.com/docs/4.3/components/forms/#server-side" rel="nofollow noreferrer">https://getbootstrap.com/docs/4.3/components/forms/#server-side</a></p>
  
  <p>Any solution ?</p>