Quantcast
Channel: Appcelerator Developer Center Q&A Tag Feed (validate)
Viewing all articles
Browse latest Browse all 12

Confirm that someone entered a number (and only a number) into a field?

$
0
0

I have an iPad application with input fields. Some of the require a number be input, such as 6 or 10.25. I then do math with the inputs when the user clicks a button, by casting the value to Number().

How can I check that the user entered a valid number (as opposed to a word or something like 1'6"?


SDK 2.01, OS 10.7.3


Viewing all articles
Browse latest Browse all 12

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>