Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue with decimal representation in countries using "," as decimal separator and "." as the thousand separator. #154

Open
ValdirGiorgi opened this issue Feb 29, 2024 · 0 comments

Comments

@ValdirGiorgi
Copy link
Contributor

Description:
In Brazil and other countries using "," as a decimal separator, it's common for users to input both "," and "." to represent the decimal point. However, when displaying values, it's preferable to always use "," as the decimal separator.

Currently, the code logic only detects the occurrence of ",." as an incorrect separator. However, in our case, we also need to consider the possibility of ".,", as we use "." as the thousand separator.

Proposed Solution:
Modify the relevant code snippet to include the check for ".,", as follows:

final hasWrongSeparator = newText.contains(',.') || newText.contains('.,');

This change will allow the logic to correctly recognize cases where "." is used as a thousand separator.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant