AspNetCore.Docs/aspnetcore/mvc/models/validation/sample
Luke Latham 69306c43f9 Model Validation: Top-level nodes (#10390)
Fixes #10264
[Review URL](https://review.docs.microsoft.com/en-us/aspnet/core/mvc/models/validation?view=aspnetcore-2.2&branch=pr-en-us-10390)

* Not too keen on "top-level node." It isn't documented anywhere, and Google Fu wasn't much help either. I've *guessed* from the API what it means (and I could be *wrong*).
* Side note: `Required` is *required* as a model property attribute to get client-side required validation to work AFAICT. Adding `Required` or `BindRequired` to the top-level node (parameter) doesn't make it work client-side. Not sure if that's an issue or not ... just a side behavior that I noticed when testing.
* `jQuery.validate()` doesn't seem to be a thing any longer. JS complains that it can't find the function with the most recent jQuery validation scripts (from the current templates). Everything seems to work without it, so I nixed it.
* The sample was *almost* updated for 2.2. This should take it across the finish line. 🏁
* In the OP, the dev said that they were missing `AddDataAnnotations`, but we don't doc that level of detail. If they go `AddMvcCore`, they're kind'a on their own to make sure that they have all of the bits in place.
2019-01-16 16:29:24 -10:00
..
Views Model Validation: Top-level nodes (#10390) 2019-01-16 16:29:24 -10:00
ClassicMovieAttribute.cs Model Validation: Top-level nodes (#10390) 2019-01-16 16:29:24 -10:00
Genre.cs Add docfx content 2016-10-28 10:35:15 -07:00
IUserRepository.cs Added Description for AdditionalFields Property of Remote Attribute (#4768) 2017-11-10 14:16:20 -10:00
MVCMovieContext.cs Add docfx content 2016-10-28 10:35:15 -07:00
Movie.cs Add Required note to model validation topic 2017-09-22 21:29:11 -05:00
MovieIValidatable.cs Model Validation: Top-level nodes (#10390) 2019-01-16 16:29:24 -10:00
MoviesController.cs Model Validation: Top-level nodes (#10390) 2019-01-16 16:29:24 -10:00
Program.cs Model Validation: Top-level nodes (#10390) 2019-01-16 16:29:24 -10:00
Startup.cs Restore missing Model State code snippet (#10199) 2019-01-04 10:28:27 -06:00
User.cs Model Validation: Top-level nodes (#10390) 2019-01-16 16:29:24 -10:00
UserRepository.cs Fix ValidationSample project compilation (#6050) 2018-04-22 19:35:50 -10:00
UsersController.cs Model Validation: Top-level nodes (#10390) 2019-01-16 16:29:24 -10:00
ValidationSample.csproj ASP.NET Core MVC: Updating validation sample to 2.2 (#10021) 2018-12-17 07:56:36 -06:00