Fix validation sample /4 (#22953)
parent
7d2bc2a788
commit
95582be7d1
|
@ -40,7 +40,7 @@ namespace ValidationSample.Pages.Movies
|
||||||
var modifiedReleaseDate = DateTime.Now.Date;
|
var modifiedReleaseDate = DateTime.Now.Date;
|
||||||
Movie.ReleaseDate = modifiedReleaseDate;
|
Movie.ReleaseDate = modifiedReleaseDate;
|
||||||
|
|
||||||
ModelState.ClearValidationState(nameof(Movie)));
|
ModelState.ClearValidationState(nameof(Movie));
|
||||||
if (!TryValidateModel(Movie, nameof(Movie)))
|
if (!TryValidateModel(Movie, nameof(Movie)))
|
||||||
{
|
{
|
||||||
return Page();
|
return Page();
|
||||||
|
|
Loading…
Reference in New Issue