From 95582be7d117acc04bc51e8ea70db23d07b1772f Mon Sep 17 00:00:00 2001 From: Rick Anderson <3605364+Rick-Anderson@users.noreply.github.com> Date: Wed, 4 Aug 2021 11:14:31 -0700 Subject: [PATCH] Fix validation sample /4 (#22953) --- .../samples/3.x/ValidationSample/Pages/Movies/Create.cshtml.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aspnetcore/mvc/models/validation/samples/3.x/ValidationSample/Pages/Movies/Create.cshtml.cs b/aspnetcore/mvc/models/validation/samples/3.x/ValidationSample/Pages/Movies/Create.cshtml.cs index efae20ea92..5f11d53447 100644 --- a/aspnetcore/mvc/models/validation/samples/3.x/ValidationSample/Pages/Movies/Create.cshtml.cs +++ b/aspnetcore/mvc/models/validation/samples/3.x/ValidationSample/Pages/Movies/Create.cshtml.cs @@ -40,7 +40,7 @@ namespace ValidationSample.Pages.Movies var modifiedReleaseDate = DateTime.Now.Date; Movie.ReleaseDate = modifiedReleaseDate; - ModelState.ClearValidationState(nameof(Movie))); + ModelState.ClearValidationState(nameof(Movie)); if (!TryValidateModel(Movie, nameof(Movie))) { return Page();