-
Notifications
You must be signed in to change notification settings - Fork 39
Description
The "Requested amount" field only accepts values written as int or as decimal value with a period as separator.
- 9999
- 9999.99
All other format are invalid.
This leads to a bad user experience for people used to write values with a thousand separator:
- 9.999
- 9.999,99
- 9 999
- 9 999,99
Hypha will do the right thing when displaying these values. With a German locale the value "9999.99" will display correctly as "9.999,99".
But if a German user enter "9.999" it will display as "10" (rounded up) while expecting to get "9.999.00".
Hypha should somehow allow users to enter values as they are used to and the clean them before saving.
For normal fields Django has this build it it seems, see https://docs.djangoproject.com/en/4.2/topics/i18n/formatting/#locale-aware-input-in-forms
But this is a stream field so we are likely needing to build something custom.