Costomers och Movies fungerar med validation

This commit is contained in:
2019-01-23 23:18:48 +01:00
parent 3e501b29d0
commit 93e8535819
10 changed files with 267 additions and 23 deletions

View File

@ -17,7 +17,7 @@ else
@using (@Html.BeginForm("Save", "Customers"))
{
@Html.ValidationSummary(true, "Please fix the following errors.")
@Html.ValidationSummary(true, "Var snäll och åtgärda felen.")
<div class="form-group">
@Html.LabelFor(m => m.Customer.Name)
@Html.TextBoxFor(m => m.Customer.Name, new { @class = "form-control" })
@ -39,6 +39,12 @@ else
</label>
</div>
@Html.HiddenFor(m => m.Customer.Id)
@Html.AntiForgeryToken();
<button type="submit" class="btn btn-primary">Save</button>
}
@section scripts
{
@Scripts.Render("~/bundles/jqueryval")
}