Skip to content
This repository has been archived by the owner on Dec 14, 2018. It is now read-only.

Dictionary ModelBinding with an empty prefix has unvalidated keys #2470

Closed
rynowak opened this issue Apr 28, 2015 · 1 comment
Closed

Dictionary ModelBinding with an empty prefix has unvalidated keys #2470

rynowak opened this issue Apr 28, 2015 · 1 comment

Comments

@rynowak
Copy link
Member

rynowak commented Apr 28, 2015

Trying to model bind the following:

"?[0].Key=key0&[0].Value=10"

public void DoThing(IDictionary<string, int> p)
{
}

Will result in ModelState.IsValid == false. The keys [0].Key and [0].Value are marked as unvalidated.

If you use a prefix in the query string, this issue doesn't occur. "?p.[0].Key=key0&p.[0].Value=10"

@Eilon Eilon added the bug label May 8, 2015
@Eilon Eilon added this to the 6.0.0-beta5 milestone May 8, 2015
@danroth27 danroth27 modified the milestones: 6.0.0-beta6, 6.0.0-beta5 May 11, 2015
rynowak added a commit that referenced this issue May 28, 2015
This was very likely fixed as part of
22f1881
@rynowak
Copy link
Member Author

rynowak commented May 28, 2015

Very likely fixed as part of 22f1881 - this no longer repros.

Enabled tests in 6e1226b

@rynowak rynowak closed this as completed May 28, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants