Commit Graph

40929 Commits

Author SHA1 Message Date
Doug Bunting 8779cafbab Use `[Display(Order=x)]` to sort validation messages and properties
- #964
- compute `ModelMetadata.Order` based on `[Display]` attribute
 - property affects e.g. `@Html.DisplayFor()` generation for complex objects
 - also affects order of messages in validation summaries
- test new scenarios involving `ModelMetadata.Order`
 - per-property `ModelMetadata` and related tests
 - validation and `HtmlHelper` tests
 - add `HtmlHelperValidationSummaryTest` (which touches on #453)
- update ModelBinding functional test to show use of `[Display(Order = x)]`

nits:
- move more `NullDisplayText` bits into proper slots (just above `Order`)
 - add doc comments for `ComputeNullDisplayText()`
- add more assertions in tests using `ModelStateDictionary.HasReachedMaxErrors`
- remove some trailing whitespace
- avoid `Assert.True()` & `Assert.False()`; split some assertions up
- `""` -> `string.Empty` in affected test classes
- rename "DefaultEditorTemplatesTest~~s~~" class and file to follow guidelines
- rename "ModelBindingTest~~s~~" class and file to follow guidelines

FYI #1888 covers a predictable (or even just stable) order in the UI
2015-01-29 09:31:05 -08:00
Pranav K 27819d88f6 Fixing NuGet.config 2015-01-29 07:55:02 -08:00
Anthony Sneed c6de763a6c [Resolves #1744] Cleanup Xml Serializer & DataContractSerializer input and output formatters. 2015-01-29 07:04:09 -08:00
Pranav K bccef90a2c Fixing Nuget.config 2015-01-29 06:28:40 -08:00
Youngjune Hong 70efc5ae0a Creating UrlUtility for IsLocalUrl, and cleaning up UrlHelper 2015-01-29 05:51:46 -08:00
Wei Wang 3bf675f343 React to runtime renaming revert 2015-01-29 00:01:52 -08:00
Pranav K 3416bfcc80 Fixing NuGet.config 2015-01-28 23:24:31 -08:00
Pranav K f51fe93b1c Fixing NuGet.config 2015-01-28 23:18:29 -08:00
Pranav K 37433056be Fixing NuGet.config 2015-01-28 23:15:50 -08:00
Pranav K ba58c767e8 Fixing NuGet.config 2015-01-28 22:34:18 -08:00
Wei Wang 334fa34e0c Change SKIP_DOTNET_INSTALL to SKIP_KRE_INSTALL 2015-01-28 18:50:50 -08:00
Wei Wang eb644da0d8 Update build.cmd and build.sh to use kvm 2015-01-28 18:50:38 -08:00
Wei Wang 8621da6cac Change SKIP_DOTNET_INSTALL to SKIP_KRE_INSTALL 2015-01-28 18:48:55 -08:00
Wei Wang 45ebae0ec8 Update build.cmd and build.sh to use kvm 2015-01-28 18:48:41 -08:00
Wei Wang a7a1f97e7a Change SKIP_DOTNET_INSTALL to SKIP_KRE_INSTALL 2015-01-28 18:42:20 -08:00
Wei Wang e03bf7557a Update build.cmd and build.sh to use kvm 2015-01-28 18:42:04 -08:00
Wei Wang 24e68d81ea Change SKIP_DOTNET_INSTALL to SKIP_KRE_INSTALL 2015-01-28 18:31:11 -08:00
Wei Wang 6367c0d249 Update build.cmd and build.sh to use kvm 2015-01-28 18:30:59 -08:00
Wei Wang 9743b590ab Merge branch 'release' of github.com:aspnet/Security into release 2015-01-28 18:30:29 -08:00
Wei Wang edc0aef067 Change SKIP_DOTNET_INSTALL to SKIP_KRE_INSTALL 2015-01-28 18:28:47 -08:00
Wei Wang fe2c5c5288 Update build.cmd and build.sh to use kvm 2015-01-28 18:28:28 -08:00
Wei Wang 95b91a60d4 Merge branch 'release' of github.com:aspnet/Routing into release 2015-01-28 18:27:58 -08:00
Wei Wang 211dc7d9d8 Change SKIP_DOTNET_INSTALL to SKIP_KRE_INSTALL 2015-01-28 18:27:12 -08:00
Wei Wang 7ae470539f Update build.cmd and build.sh to use kvm 2015-01-28 18:26:45 -08:00
Wei Wang ba387a3a22 Merge branch 'release' of github.com:aspnet/Razor into release 2015-01-28 18:25:49 -08:00
Wei Wang e81f4a8e22 Change SKIP_DOTNET_INSTALL to SKIP_KRE_INSTALL 2015-01-28 18:24:23 -08:00
Wei Wang ae7d7daa99 Update build.cmd and build.sh to use kvm 2015-01-28 18:24:07 -08:00
Wei Wang 58b5445215 Merge branch 'release' of github.com:aspnet/Mvc into release 2015-01-28 18:23:42 -08:00
Wei Wang 9800bc82bd Change SKIP_DOTNET_INSTALL to SKIP_KRE_INSTALL 2015-01-28 18:21:41 -08:00
Wei Wang 7fe1b5041c Update build.cmd and build.sh to use kvm 2015-01-28 18:21:24 -08:00
Wei Wang 37eb84a840 Change SKIP_DOTNET_INSTALL to SKIP_KRE_INSTALL 2015-01-28 18:20:22 -08:00
Wei Wang ab257ed716 Update build.cmd and build.sh to use kvm 2015-01-28 18:20:06 -08:00
Wei Wang 0ce0423c24 Change SKIP_DOTNET_INSTALL to SKIP_KRE_INSTALL 2015-01-28 18:19:14 -08:00
Wei Wang ce5465e514 Update build.cmd and build.sh to use kvm 2015-01-28 18:18:05 -08:00
Wei Wang 8080826e4a Merge branch 'release' of github.com:aspnet/Identity into release 2015-01-28 18:17:25 -08:00
Wei Wang ae56486c6a Change SKIP_DOTNET_INSTALL to SKIP_KRE_INSTALL 2015-01-28 18:12:37 -08:00
Wei Wang c90a491821 Update build.cmd and build.sh to use kvm 2015-01-28 18:11:41 -08:00
Wei Wang c62c2b39c8 Merge branch 'release' of github.com:aspnet/HttpAbstractions into release 2015-01-28 18:10:45 -08:00
Wei Wang 89484cdffb Change SKIP_DOTNET_INSTALL to SKIP_KRE_INSTALL 2015-01-28 18:10:20 -08:00
Wei Wang 2535e30b12 Update build.cmd and build.sh to use kvm 2015-01-28 18:10:06 -08:00
Wei Wang 5fec478747 Merge branch 'release' of github.com:aspnet/Hosting into release 2015-01-28 18:09:34 -08:00
Pranav K 4db95e198f Merge remote-tracking branch 'origin/release' into dev 2015-01-28 18:00:24 -08:00
Pranav K ed2bf6cee9 Reacting to XRE renames 2015-01-28 17:59:20 -08:00
Wei Wang dd1f5ea42c Change SKIP_DOTNET_INSTALL to SKIP_KRE_INSTALL 2015-01-28 17:19:17 -08:00
Wei Wang 531447687e Update build.cmd and build.sh to use kvm 2015-01-28 17:19:01 -08:00
Wei Wang 28bca9e312 Merge branch 'release' of github.com:aspnet/Diagnostics into release 2015-01-28 17:18:24 -08:00
Wei Wang de6cbb05df Change SKIP_DOTNET_INSTALL to SKIP_KRE_INSTALL 2015-01-28 17:09:43 -08:00
Wei Wang 2435a2468d Update build.cmd and build.sh to use kvm 2015-01-28 17:09:19 -08:00
Wei Wang e1aee92472 Merge branch 'release' of github.com:aspnet/DataProtection into release 2015-01-28 17:08:35 -08:00
Ryan Nowak 42df4cf2ed Fix for #1538 and #1891
Changes here are all focused around MaxModelErrors on
ModelStateDictionary.

MaxAllowedErrors now defaults to 200 (same as options). This means that
constructing a new ModelStateDictionary with the default constructor will
use this default. There's a new constructor for creating a
MaxAllowedErrors with a non-default value.

The ControllerActionArgumentBinder is now responsible for setting the
value from options onto ActionContext.ModelState. This results in better
layering and guarantees the option is respected if someone uses
extensibility to call model binding.

ModelStateDictionary.CanAddErrors is renamed to MaxErrorsReached. We
wanted to change the behavior of this property, but realized that it's
very useful inside the model validation code, so opted to renamed.

There's also a bunch of doc cleanup inside ModelStateDictionary to
simplify things and improve clarity.
2015-01-28 16:53:28 -08:00