Closed carlblanchard closed 2 years ago
We've moved this issue to the Backlog milestone. This means that it is not going to happen for the coming release. We will reassess the backlog following the current release and consider this item at that time. However, keep in mind that there are many other high priority features with which it will be competing for resources.
If you have 3 classes you want to work on (for example) then follow these steps
Create a view model class that has a property for each
public class MyViewModel
{
public Person Applicant { get; set; }
public CourseInfo CourseInfo { get; set; }
public BankDetails BankDetails { get; set; }
}
Create an instance of MyViewModel
in your page component
Create an instance of EditContext in your page component, passing in the object from 2
In every one of your <EditForm>
components you can pass an explicit EditContext like so
<EditForm EditContext=MyEditContext>
<DataAnnotationsValidator/>
<InputForm @bind-Value=MyViewModel.Application.FamilyName/>
</EditForm>
<EditForm EditContext=MyEditContext>
<DataAnnotationsValidator/>
<InputForm @bind-Value=MyViewModel.BankDetails.AccountHolderName/>
</EditForm>
You can show a single list of errors like this
<EditForm EditContext=MyEditContext>
<ValidationSummary/>
</EditForm>
Hi. Thanks for contacting us. We're closing this issue as there was not much community interest in this ask for quite a while now. You can learn more about our triage process and how we handle issues by reading our Triage Process writeup.
As per the comments in issue https://github.com/dotnet/AspNetCore.Docs/issues/18481#issuecomment-633968572
It would be nice if the ValidationSummary control in Blazor client could show errors across all forms on the page.