Aspnetcore.docs: ValidationSummary across multiple forms.

Created on 26 May 2020  Â·  4Comments  Â·  Source: dotnet/AspNetCore.Docs

Does the ValidationSummary control support multiple forms on a page?
Regards

Blazor product-question

Most helpful comment

Done, Thanks Luke and Enjoy your morning coffee... I am already at least 15 down lol

All 4 comments

Hello @carlblanchard ... please use the This page feedback button+form at the bottom of a topic to open an issue.

https://docs.microsoft.com/en-us/aspnet/core/blazor/forms-validation?view=aspnetcore-3.1#feedback

As far as I know, it does if a model isn't provided.

Hmm, that would be amazing if it was true... I get the following error.
Unhandled exception rendering component: EditForm requires a Model parameter, or an EditContext parameter, but not both

The structure of my HTML is

<section class="section">
            <EditForm>
                <ValidationSummary />
            </EditForm>
            <div class="row">
.... more HTML

 <EditForm Model="@UserPreferences" OnValidSubmit="LanguageSettingOnValidSubmit">
.... more form contents
</EditForm>

.... more HTML
<EditForm Model="@UserPreferences" OnValidSubmit="TimezoneOnValidSubmit">
.... more form contents
</EditForm>

Oh, yes. I forgot that the ValidationSummary component must be in the form. I just got up and no ☕ yet.

Open a suggestion for this as a feature with the product unit at ...

https://github.com/dotnet/aspnetcore/issues

Done, Thanks Luke and Enjoy your morning coffee... I am already at least 15 down lol

Was this page helpful?
0 / 5 - 0 ratings

Related issues

davisnw picture davisnw  Â·  3Comments

StevenTCramer picture StevenTCramer  Â·  3Comments

royshouvik picture royshouvik  Â·  3Comments

Rick-Anderson picture Rick-Anderson  Â·  3Comments

danroth27 picture danroth27  Â·  3Comments