2
Assigns Required="true"
in a password field, but the message is in English, as seen in the image below:
I wanted to personalize this message by leaving it in PT-BR
<div class="form-group">
@Html.LabelFor(model => model.Senha, htmlAttributes: new { @class = "control-label col-md-2" })
<div class="col-md-10">
@Html.EditorFor(model => model.Senha, new { htmlAttributes = new { @class = "form-control senha", id = "Senha", required="true" } })
@Html.ValidationMessageFor(model => model.Senha, "", new { @class = "text-danger" })
</div>
</div>
Obs: I didn’t do no anottation
, why the password attribute is in the person class, which is inherited to the user and client class, where the user will have a mandatory password and the client will not have a password.