fix: [v5] FluentValidationMessage icon shrinks when the validation message wraps
Los mantenedores suelen responder en 1 día
@vnbaaij ya está trabajando en esto.
Desde el 2/12/2026.
Evaluación
Este issue todavía no se ha evaluado.
Descripción
🐛 Bug Report
When a validation message shown by FluentValidationMessage (inside FluentField) is long enough to wrap, the error icon shrinks. The longer the message, the smaller the icon. The icon should always stay 12px wide.
💻 Repro or Code Sample
<EditForm Model="@_model">
<DataAnnotationsValidator />
<FluentNumberField @bind-Value="_model.NumberOfInstalments"
Label="Number of Instalments"
Style="max-width: 150px" />
</EditForm>
@code {
private readonly Model _model = new() { NumberOfInstalments = 43643436 };
private sealed class Model
{
[Range(1, 12, ErrorMessage = "Exceeds the number of valid instalments for this period")]
public int NumberOfInstalments { get; set; }
}
}
- Render the field in a narrow container (e.g.
max-width: 150px). - Trigger validation so the long message wraps over several lines.
- Compare the error icon with a field that has a short, single-line message.
🤔 Expected Behavior
The error icon keeps the same size (12px) whatever the message length, and lines up with the first line of the message.
😯 Current Behavior
The icon is squeezed horizontally and gets smaller as the message gets longer. It is also vertically centred against the whole multi-line message instead of sitting next to the first line.
💁 Possible Solution
FluentValidationMessage.razor renders:
<div message>
@CreateIcon(Icon) @* FluentIcon, Width="12px" *@
@message
</div>
and FluentValidationMessage.razor.css styles it as:
.fluent-validation-message > div[message] {
display: flex;
align-items: center;
}
The icon is a flex item with the default flex-shrink: 1, so it gives up width when the text wraps. Suggested fix:
.fluent-validation-message > div[message] {
display: flex;
align-items: flex-start; /* optional: line the icon up with the first line */
}
.fluent-validation-message > div[message] > svg {
flex-shrink: 0;
}
🔦 Context
We use Fluent UI Blazor v5 inputs in forms where validation messages are often longer than the input is wide (e.g. number fields limited to ~150px). The shrinking icons look inconsistent across fields on the same page. We'd rather fix this upstream than add a local CSS override.
🌍 Your Environment
- OS & Device: Windows 11, PC
- Browser:
- .NET and Fluent UI Blazor library version: .NET 11, Microsoft.FluentUI.AspNetCore.Components 5.1.0 (same CSS still on
dev-v5)
- Lenguaje dominante
- C#
- Estrellas
- 4.9k
- Forks
- 500
- Merge medio
- 15 h 28 min
- PR fusionados (30 d)
- 58
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de microsoft/fluentui-blazor
-
fix: [v5] FluentTextInput throws from ElementInternals during .NET 11 enhanced form navigationAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 73/100
microsoft/fluentui-blazor#5721 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
microsoft/fluentui-blazor#5684 ·
Los mantenedores suelen responder en 1 día
-
fix: option list stays open after a mouse pick in single-select FluentAutocompletePosiblemente ocupada @dvoituron la tomó hace 1 día. Abierto
microsoft/fluentui-blazor#5715 · 1 asignado ·
Los mantenedores suelen responder en 1 día
-
Dificultad 3/5 1-2 días Aptitud para principiantes 56/100
microsoft/fluentui-blazor#5711 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 3/5 1-2 días Aptitud para principiantes 68/100
microsoft/fluentui-blazor#5707 ·
Los mantenedores suelen responder en 1 día
Todos los issues de microsoft/fluentui-blazor
Issues similares
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 1 día
-
[BUG] speech tts synthesize rejects valid locales such as fil-PH, yue-CN and sr-Latn-RS in --languagePosiblemente ocupada @Shizoqua la tomó hoy. AbiertoAzure.Mcp.Server needs-triage
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 2 días
-
Project dependencies are outdatedPosiblemente ocupada @yasmoradi la tomó hoy. Abiertodependencies
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
bitfoundation/bitplatform#15616 ·
Los mantenedores suelen responder en 1 día
-
:watch: Not Triaged Pri3
Dificultad 1/5 Menos de una hora Aptitud para principiantes 91/100
Los mantenedores suelen responder en 1 día
-
area-controls-shell platform/android
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
dotnet/maui#41304 · 1 reacción ·
Los mantenedores suelen responder en 1 día