-
Notifications
You must be signed in to change notification settings - Fork 10.6k
Pass css class in <ValidationSummary /> to the generated <ul> #43860
Copy link
Copy link
Labels
area-blazorIncludes: Blazor, Razor ComponentsIncludes: Blazor, Razor ComponentsenhancementThis issue represents an ask for new feature or an enhancement to an existing oneThis issue represents an ask for new feature or an enhancement to an existing onefeature-blazor-builtin-componentsFeatures related to the built in components we ship or could ship in the futureFeatures related to the built in components we ship or could ship in the futuregood first issueGood for newcomers.Good for newcomers.help wantedUp for grabs. We would accept a PR to help resolve this issueUp for grabs. We would accept a PR to help resolve this issue
Milestone
Metadata
Metadata
Assignees
Labels
area-blazorIncludes: Blazor, Razor ComponentsIncludes: Blazor, Razor ComponentsenhancementThis issue represents an ask for new feature or an enhancement to an existing oneThis issue represents an ask for new feature or an enhancement to an existing onefeature-blazor-builtin-componentsFeatures related to the built in components we ship or could ship in the futureFeatures related to the built in components we ship or could ship in the futuregood first issueGood for newcomers.Good for newcomers.help wantedUp for grabs. We would accept a PR to help resolve this issueUp for grabs. We would accept a PR to help resolve this issue
Type
Fields
Give feedbackNo fields configured for Feature.
Is there an existing issue for this?
Is your feature request related to a problem? Please describe the problem.
I am trying to pass additional css classes to the generated
ulelement. I am applying general formatting via thevalidation-errorscss class, but I would like to be able to pass utility classes for spacing (i.e.pt-2to add 8px of padding to the top of the validation summary).Describe the solution you'd like
Update
<ValidationSummary />to pass unmatched attributes (via splatting) to thevalidation-errorselement. In the case ofclass, it should append the passed in classes to the existingvalidation-errorsclass.Additional context
For example:
should result in: