My app is used by users that are either using comma or dot as a decimal separator.
The laravel backend is expecting a DOT as a number separator, because of "number" rule in form requests, and because of mysql.
The frontend is a Vue SPA app.
I've tried to change the validator rule so numbers are both accepted as "dot" or "comma" serapated, but then the DB complains about comma numbers !
So, I was wondering what should be the best practice : should the frontend ensure that numbers containing comma are replaced with dots before sending the SAVE call, or should it be handled on backend ? submitted by /u/Napo7
[link] [comments]
0 comments:
Post a Comment
Thanks