2 ms·
You don't handle localization in the field directly. You let it be "text" and ask your preferred library (which is built by people smarter than you/me) to conve
by unnouinceput 4y ago
You don't handle localization in the field directly. You let it be "text" and ask your preferred library (which is built by people smarter than you/me) to convert said text to valid number. If it converts then good, now you have a number variable in memory with which you can do whatever. If it fails you pop-up the error message and ask the user to enter a valid number. I find on the fly correction (don't let user type letters, ignore signs, etc) to be confusing to end-user.