3 ms·
- this seems highly specific for a SPA and not server-side How would you expect users to enter numbers on the server?
by onion2k 4y ago
- this seems highly specific for a SPA and not server-side
How would you expect users to enter numbers on the server?
- withinboredom 4y agoform method = ‘POST’ and a submit button. Usually.
- anamexis 4y agoso... with a number input?
- cyral 4y agoA SPA is calling a backend as well... and the backend (SPA or not) still needs to handle the number locale (comma versus decimals), unexpected 'e', etc. Not sure what about this is a JS problem.
- withinboredom 4y agoFWIW, I’ve never seen an ‘e’ from a number input on the PHP side, probably because it is parsed correctly. I’ve also never seen it from ‘.valueAsNumber’ on the js side either, except rendering big/small numbers but the internal representation was still correct. Using IntlFormat solved that problem IIRC. If you are passing it around as a string, then I imagine it’s a bigger problem.