This is a fix for the specific case reported in #3743 and also a few
related cases where the object being validated does not come from user
input.
Because the CancellationToken is bound using the 'empty prefix',
suppressing validation causes the validation system to suppress ALL keys
in the MSD. This will wipe out validation info for other, unrelated model
data. The same can occur for [FromServices], IFormCollection, IFormFile,
and HttpRequestMessage (anythere when MSD key == null and
SuppressValidation == true).
The other change here is related to the [FromBody]. We don't want to
create an entry in the model state for a 'valid' model with the empty
prefix. This can cause the system to miss validation errors. If you end up
in a situation where there's an entry with the empty prefix for an invalid
state, you won't accidentally miss validation errors.
- #2969
- `RemoteAttribute` did not support `IStringLocalizer` overrides
- use same `MvcDataAnnotationsLocalizationOptions` property as for other `ValidationAttribute`s
- error message `NumericClientModelValidator` added could not be overridden
- not related to `IStringLocalizer` because users have no way to set the resource lookup key
- extend `IModelBindingMessageProvider` to add the necessary `Func<,>`
- also correct problem using resources with `RemoteAttribute` and add lots of tests
- new `--no-restore` pseudo-target controls whether `dotnet restore` runs at all
- `--quiet` adds `--verbosity minimal` to `dotnet restore` command
nit: clean out dangling `KOREBUILD_TEST_DNXCORE` environment variable
- `--test-dnxcore` now logs a warning
* Add an UnsupportedContentType to the ModelState dictionary when no formatter can read the body.
* Add a filter to the pipeline that searches for that specific exception and transforms the response into 415.