Commit Graph

4 Commits

Author SHA1 Message Date
Doug Bunting 40b7636b72 Use `ModelMetadata.GetDisplayName()` in error message replacing `FormatException` and `OverflowException`
- #3227
- much of change is to tests, creating and passing `ModelMetadata`
- updated `InputFormatterContext` to make `ModelMetadata` available to `JsonInputFormatter`
  - walk `ModelMetadata` tree to get information about property with an issue
- add missing `null` checks in `ModelStateDictionaryExtensions`
2015-10-22 15:50:36 -07:00
Pranav K 8b0c157296 Rename ModelState (the type) -> ModelStateEntry
Fixes #3326
2015-10-20 16:43:00 -07:00
Doug Bunting eff10cdd66 Move `ModelStateDictionaryExtensions` into `Microsoft.AspNet.Mvc.ModelBinding` namespace
- missed the inconsistency when reviewing
- kept class in ViewFeatures assembly because it depends on `ExpressionHelper`

nit: wrap some long lines
2015-09-26 18:15:04 -07:00
Muchiachio b28debf442 Generic ModelStateDictionary add and remove extensions
- Added generic add model error and remove extensions for
ModelStateDictionary, to avoid using hard coded strings then specifying
model state dictionary keys.
- Added generic removal all  extension for ModelStateDictionary, to
support removing all the model state keys for given expression.

aspnet/Mvc#3164
2015-09-26 18:14:58 -07:00