From 46cb4f7bc300bd7597378b9657a1123154b23115 Mon Sep 17 00:00:00 2001 From: ichengzi Date: Tue, 13 Dec 2016 13:00:00 -0600 Subject: [PATCH] change Views/Books/Edit to Views/Movies/Edit (#2381) --- aspnetcore/tutorials/first-mvc-app/controller-methods-views.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aspnetcore/tutorials/first-mvc-app/controller-methods-views.md b/aspnetcore/tutorials/first-mvc-app/controller-methods-views.md index 83a28fde3c..a847884156 100644 --- a/aspnetcore/tutorials/first-mvc-app/controller-methods-views.md +++ b/aspnetcore/tutorials/first-mvc-app/controller-methods-views.md @@ -114,7 +114,7 @@ The `[ValidateAntiForgeryToken]` attribute validates the hidden [XSRF](../../sec The [model binding](../../mvc/models/model-binding.md) system takes the posted form values and creates a `Movie` object that's passed as the `movie` parameter. The `ModelState.IsValid` method verifies that the data submitted in the form can be used to modify (edit or update) a `Movie` object. If the data is valid it's saved. The updated (edited) movie data is saved to the database by calling the `SaveChangesAsync` method of database context. After saving the data, the code redirects the user to the `Index` action method of the `MoviesController` class, which displays the movie collection, including the changes just made. -Before the form is posted to the server, client side validation checks any validation rules on the fields. If there are any validation errors, an error message is displayed and the form is not posted. If JavaScript is disabled, you won't have client side validation but the server will detect the posted values that are not valid, and the form values will be redisplayed with error messages. Later in the tutorial we examine [Model Validation](../../mvc/models/validation.md) validation in more detail. The [Validation Tag Helper](../../mvc/views/working-with-forms.md) in the *Views/Book/Edit.cshtml* view template takes care of displaying appropriate error messages. +Before the form is posted to the server, client side validation checks any validation rules on the fields. If there are any validation errors, an error message is displayed and the form is not posted. If JavaScript is disabled, you won't have client side validation but the server will detect the posted values that are not valid, and the form values will be redisplayed with error messages. Later in the tutorial we examine [Model Validation](../../mvc/models/validation.md) validation in more detail. The [Validation Tag Helper](../../mvc/views/working-with-forms.md) in the *Views/Movies/Edit.cshtml* view template takes care of displaying appropriate error messages. ![image](controller-methods-views/_static/val.png)