packstack icon indicating copy to clipboard operation
packstack copied to clipboard

Comma decimal separator

Open gucr opened this issue 4 years ago • 1 comments

Hi there and first of all thanks for this amazing app!

I have noticed that while filling an item price, I am unable to enter a comma decimal number (about 50% of countries use 10,50 instead of 10.50), resulting in a 400 error from the API (exposing the executed SQL)

An easy fix would be to add the type=number" to the price input, the browser will handle the normalization from the user regional settings.

https://github.com/maplethorpej/packstack/blob/67c05d30104c52bd6de2b0b179096a54d5987dbf/frontend/src/app/components/ItemForm/ItemForm.tsx#L128-L133

gucr avatar Feb 25 '21 18:02 gucr

Thanks for pointing that out! Sounds like we also need to do some work to add some extra security in order to not be exposing the SQL when there's an error. You're certainly welcome to put in a PR for this change if you're able.

darinalleman avatar Feb 25 '21 18:02 darinalleman