BlipDrop
BlipDrop copied to clipboard
Mistake in Create.cshtml
You have
@Html.EditorFor(model => model.CustomerName, new { htmlAttributes = new { @class = "form-control", @autofocus = "autofocus" } })
@Html.ValidationMessageFor(model => model.CustomerId, "", new { @class = "text-danger" })
but it shoul be
@Html.EditorFor(model => model.CustomerName, new { htmlAttributes = new { @class = "form-control", @autofocus = "autofocus" } })
@Html.ValidationMessageFor(model => model.CustomerName, "", new { @class = "text-danger" })
change model => model.CustomerId to model => model.CustomerName in CustomerName field
Without this change you don't see error message when you leave empty filed: CustomerName