I'm creating an application in Asp.NET MVC (I'm using the Scafffolded feature), however, all the fields are being filled in, how do I remove this parameter?
Note: I've tried unchecking the "Allow null value" option in the database, but without success.
I'm finding that this validation is occurring in .cshtml
, but I have not located it.
Template.
public class prospectModel
{
public int id { get; set; }
public string contato { get; set; }
public string nomeRazaoSocial { get; set; }
public int documento { get; set; }
public int telefone { get; set; }
public int celular { get; set; }
public string email { get; set; }
public string anotacoes { get; set; }
}
cshtml
<div class="form-group"> @Html.LabelFor(model => model.celular, htmlAttributes: new { @class = "control-label col-md-2" })
<div class="col-md-10"> @Html.EditorFor(model => model.celular, new { htmlAttributes = new { @class = "form-control" } })@Html.ValidationMessageFor(model => model.celular, "", new { @ class = "text-danger" })
</div>
</div>