You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Dec 14, 2018. It is now read-only.
The problem described in #2294 has been fixed for controller properties and action parameters. Unfortunately that problem remains when using TryUpdateModelAsync(). The following form data (an example from #2294) will not be correctly validated because the IObjectModelValidator will not be informed that model nodes collection[key1] or collection[key2] exist.
Root cause: ModelBindingHelper.TryUpdateModelAsync() completely ignores the ModelValidationNode tree the model binding system returns, passing a new ModelValidationNode instance to the IObjectModelValidator. This method does not even check ModelBindingResult.IsModelSet before using ...Model.
…ing elsewhere
- #2941
- honor `ModelBindingResult.IsModelSet` and use `ModelBindingResult.ValidationNode`
- enable correct validation of collections or after model binding falls back to the empty prefix
- code previously matched `Controller.TryValidateModel()`; less context available in that case
The problem described in #2294 has been fixed for controller properties and action parameters. Unfortunately that problem remains when using
TryUpdateModelAsync()
. The following form data (an example from #2294) will not be correctly validated because theIObjectModelValidator
will not be informed that model nodescollection[key1]
orcollection[key2]
exist.Root cause:
ModelBindingHelper.TryUpdateModelAsync()
completely ignores theModelValidationNode
tree the model binding system returns, passing a newModelValidationNode
instance to theIObjectModelValidator
. This method does not even checkModelBindingResult.IsModelSet
before using...Model
.(noticed while investigating #2633)
The text was updated successfully, but these errors were encountered: