How to apply the bootstrap v4 form input validation classes with the ASP.NET Razor syntax?

0

Follow the code below:

View:

<div class="form-group">
    @Html.LabelFor(m => m.Telefone, new { @class = "font-weight-bold" })
    @Html.TextBoxFor(m => m.Telefone, new { @class = "form-control", @placeholder = "Digite seu telefone" })
    @Html.ValidationMessageFor(m => m.Telefone, "", new { @class = "text-danger" })
</div>

Here is an example of the bootstrap v4: link

They use the class is-invalid and is-valid . How do I do this in Razor?

    
asked by anonymous 27.01.2018 / 17:05

0 answers