MudFormComponent.Culture: Implementation deviates from documentation
Before reporting
- I searched existing issues
- I tried in private/incognito browser
What went wrong?
Documentation and implementation are out of sync
The documentation states that the default value is CultureInfo.InvariantCulture:
Defaults to
CultureInfo.InvariantCulture.
However, the current implementation initializes the property with CultureInfo.CurrentUICulture:
I believe the implementation should be changed rather than the documentation.
Using InvariantCulture as the default provides deterministic and culture-independent parsing/formatting behavior, which is especially important for form components. It also aligns with the documented API contract and avoids unexpected behavior changes based on the user's UI culture.
Suggested change:
public CultureInfo Culture { get; set; } = CultureInfo.InvariantCulture;Unless there was an intentional design change, this looks like a regression or an oversight that causes the implementation to diverge from the documented behavior.
Reproduction link
https://github.com/MudBlazor/MudBlazor/blob/dev/src/MudBlazor/Base/MudFormComponent.cs
Reproduction steps
Not a runtime issue
Version (bug)
v9.10.0
Version (working)
No response
Environment
No response
Blazor rendering mode
No response
Source: MudBlazor/MudBlazor