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

fix: allow numeric value input for amount #411

Merged
merged 1 commit into from
Jun 10, 2024

Conversation

dhruvanbhalara
Copy link
Contributor

@dhruvanbhalara dhruvanbhalara commented Dec 10, 2023

SahSantoshh added a commit to SahSantoshh/Kharcha that referenced this pull request Dec 29, 2023
maxLength: 13,
maxLines: 1,
counterText: '',
inputFormatters: [
FilteringTextInputFormatter.allow(RegExp(r"[0-9.]")),
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This could lead to issues in other languages, dutch for example uses , as a decimal point

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@xunafay, I've covered this scenario.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've gone through all the country data in the project and I've found the following decimal & thousands separators: [ .,-']
I could confirm no missing ones with this regex: ".+_separator": "[^ '.,-]"

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@xunafay, Do you mean like this?

RegExp(r"[0-9'.,-]")

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, except the space is missing, in case the user types 1 000 or similar

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@xunafay, I've updated regex, can you please review it?

@dhruvanbhalara
Copy link
Contributor Author

Hi @h4h13,
should I change the base branch of PR?

@h4h13
Copy link
Owner

h4h13 commented Feb 15, 2024

Not please 🥺 I'm working on new things so once it's stabilized then you can change pr destination

@h4h13
Copy link
Owner

h4h13 commented Mar 7, 2024

Hi @dhruvanbhalara I have updated this widget as part of the iOS keyboard is not able to dismiss while done entering the amount. if it still needs to fix add your changes and change pr to dev2

@h4h13
Copy link
Owner

h4h13 commented Mar 7, 2024

Let me know once it's finished will merge it

@dhruvanbhalara
Copy link
Contributor Author

Hi @h4h13,
it's ready for review now.

@h4h13 h4h13 merged commit f4f7415 into h4h13:dev Jun 10, 2024
@dhruvanbhalara dhruvanbhalara deleted the allow_numeric_value_for_amount branch June 10, 2024 11:13
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

Successfully merging this pull request may close these issues.

Make the area where we enter the amount as number only. transaction input not using the correct decimator
4 participants