Skip to content

Commit

Permalink
fix: Ensure Custom NumberFormatter is applied in NumberBox validation
Browse files Browse the repository at this point in the history
  • Loading branch information
morning4coffe-dev committed Oct 22, 2024
1 parent b6333bd commit 7a43317
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions src/Uno.UI/Microsoft/UI/Xaml/Controls/NumberBox/NumberBox.cs
Original file line number Diff line number Diff line change
Expand Up @@ -534,11 +534,7 @@ private void ValidateInput()

var value = AcceptsExpression
? NumberBoxParser.Compute(text, numberParser)
: ApiInformation.IsTypePresent(numberParser?.GetType().FullName)
? numberParser.ParseDouble(text)
: double.TryParse(text, out var v)
? (double?)v
: null;
: numberParser.ParseDouble(text);

if (value == null)
{
Expand Down

0 comments on commit 7a43317

Please sign in to comment.