Can anyone help me with a conversion issue I'm facing?
In our project, the backend uses decimal numbers with commas. On the front end, there are fields mapped to Number that accept decimals as well. When using the Number()
function, it converts decimal numbers with dots from strings ("1.2" --> 1.2 OR "1,2" --> NaN).
I need to send the form value to the backend after removing different localization symbols. However, the backend only accepts decimal numbers in the format 1,2 and not with dots. Sending it as a string is not an option either. Since we cannot change the backend (including the rest API), this conversion needs to be handled on the front end side. Any suggestions for a suitable conversion method? Thank you!