I'll like to add to this post, that I was experienceing the same issue but in a PartialView.
And I needed to add
To the partial view, even if already present in the _Layout view.
References:
- Data Annotations / Validation not working for partial views