fix: support comma-separated currency input for budgeted_spending #2500 #2516

Closed
Mohan82git wants to merge 1 commits from comma-fails-bug into main
Mohan82git commented 2025-07-24 18:28:46 +08:00 (Migrated from github.com)

What this does

This pull request fixes an issue where users would see a validation error (“Enter a number”) when trying to input currency values like 1,234.56 in the budget form. The problem was that Rails didn’t recognize numbers with commas as valid.

To solve this, we now sanitize the budgeted_spending input by removing commas before it's processed — so users can enter currency in a more natural way without running into errors.

What changed

  • Updated the budget_category_params method in budget_categories_controller.rb to strip commas from the budgeted_spending value.

Fixes #2500

### What this does This pull request fixes an issue where users would see a validation error (“Enter a number”) when trying to input currency values like 1,234.56 in the budget form. The problem was that Rails didn’t recognize numbers with commas as valid. To solve this, we now sanitize the budgeted_spending input by removing commas before it's processed — so users can enter currency in a more natural way without running into errors. ### What changed - Updated the budget_category_params method in budget_categories_controller.rb to strip commas from the budgeted_spending value. ### Related issue Fixes #2500
jjmata commented 2025-07-26 00:59:52 +08:00 (Migrated from github.com)

This repo is no longer maintained. Want to submit your PR here instead, @Mohan82git? 🙏

This repo is [no longer maintained](https://github.com/maybe-finance/maybe/blob/main/README.md?plain=1#L15). Want to submit your PR [here](https://github.com/we-promise/sure) instead, @Mohan82git? 🙏
Mohan82git commented 2025-07-26 12:18:46 +08:00 (Migrated from github.com)

This repo is no longer maintained. Want to submit your PR here instead, @Mohan82git? 🙏

There is no such issue there so i guess that bug is fixed

> This repo is [no longer maintained](https://github.com/maybe-finance/maybe/blob/main/README.md?plain=1#L15). Want to submit your PR [here](https://github.com/we-promise/sure) instead, @Mohan82git? 🙏 There is no such issue there so i guess that bug is fixed

Pull request closed

Sign in to join this conversation.