New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Validate nested sub-properties #13986
Conversation
@pranavkm Where does |
Fixed |
@SteveSandersonMS one minute review please. |
I'm not sure this approach is quite right. The Making this work cleanly involves some logic changes inside As for what we should document for 3.0, I'm not sure. @pranavkm What problems occur due to the incorrect dictionary keys? Is it good enough that we can tell people to do this in 3.0 then change the advice in 3.1? |
I should have kept a gif of an app showing the repro. But since the keys are different, you can get field validaton and submit validation duplicated for the same field. In addition, submit validation would not "clear" the state of field validation. Both of these are not issues for top level properties where the keys match. My plan was to suggest this, since it's a well-known DataAnnotations primitive until we have a better solution in 3.1. |
I don't think we should suggest an approach that leads to buggy behavior (e.g., duplicated validation error messages). I'd prefer to hold off on giving any advice until we have a reasonable story for it. |
Updated the text to point to a sample. |
Is it ready? I'd like to change that so that the sample link is under suitable link text. ... and a few other nits: 2nd person, contraction, "need." |
The sample is still in PR: aspnet/samples#44. I just want some eyes on it before it's merged. |
I'll stand by until the dust has settled on everything. The changes are nits:
I'll fix it up at the end. |
@guardrex the sample was merged - https://github.com/aspnet/samples/tree/master/samples/aspnetcore/blazor/Validation. All yours |
@pranavkm Tough to describe! 😄 See if the update is sane. If so, . |
Let's get this merged in 👍 |
No description provided.