How to apply bootstrap v4 form input validation classes with the ASP.NET Razor syntax?
问题 The following code: View:(is-valid) <div class="form-group"> @Html.LabelFor(m => m.Telefone, new { @class = "font-weight-bold" }) @Html.TextBoxFor(m => m.Telefone, new { @class = "form-control is-valid", @placeholder = "Digite seu telefone" }) @Html.ValidationMessageFor(m => m.Telefone, "", new { @class = "text-danger" }) </div> View:(is-invalid) <div class="form-group"> @Html.LabelFor(m => m.Telefone, new { @class = "font-weight-bold" }) @Html.TextBoxFor(m => m.Telefone, new { @class = "form