fix: APP-540 add support for commas in editable input#2598
Conversation
✅ Deploy Preview for regen-website ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
✅ Deploy Preview for terrasos ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
|
@erikalogie @S4mmyb see testing instructions |
|
@r41ph how can I test this, I used my VPN to connect to a place in France but it doesn't seem to work |
|
@erikalogie I believe is the browser's setting language that is checked for this not the location. The browser is the one handling the numbers formatting (in the cases where they do it, because some browsers/versions just let HTML handle it, which means they don't show commas) |
yes definitely, could you create a task for that? |
any fix for this @r41ph ? |
It doesn't seem to be related with these updates. I see this happening in dev too: https://dev.app.regen.network/project/C01-007/buy @blushi I have created a new issue to fix it: https://regennetwork.atlassian.net/browse/APP-612 |
|
Ok I tested with my browser's language set to Spanish from Spain and it worked as expected. |
|
I just moved APP-612 into this sprint |
|
|
||
| const amountValid = +currentValue <= maxValue && +currentValue > 0; | ||
| const amountValid = | ||
| +currentValue.replace(/,/g, '.') <= maxValue && |
There was a problem hiding this comment.
maybe we could set up some util function to not have to repeat .replace(/,/g, '.') several times?
There was a problem hiding this comment.
I have store the value in a variable, wdyt?
70fc523 to
2aff969
Compare
2aff969 to
fa90392
Compare
fa90392 to
de868d6
Compare


Description
https://regennetwork.atlassian.net/browse/APP-540
Author Checklist
All items are required. Please add a note to the item if the item is not applicable and
please add links to any relevant follow up issues.
I have...
How to test
While working on this I've been changing the browser's language (in Chrome in Settings > Language > Preferred languages) and putting different languages on top makes the numbers format change. I haven't been able to see this settings update work on the buy credits flow step 1, although I think @blushi can see the French local format (commas) in step 1, is that right?
Reviewers Checklist
All items are required. Please add a note if the item is not applicable and please add
your handle next to the items reviewed if you only reviewed selected items.
I have...