Login or Sign Up
Logging in...
Remember me
Log in
Or
Sign Up
Forgot password or user name?
Log in with
Search in titles only
Search in Java only
Search
Advanced Search
Forums
BYTES
Product Launch
Updates
Developer Toolkit
Today's Posts
Member List
Calendar
Home
Forum
Topic
Java
Releated DesktopBased for validation code
Collapse
X
Collapse
Posts
Latest Activity
Photos
Page
of
1
Filter
Time
All Time
Today
Last Week
Last Month
Show
All
Discussions only
Photos only
Videos only
Links only
Polls only
Events only
Filtered by:
Clear All
new posts
Previous
template
Next
Jitendraimrb
New Member
Join Date:
May 2014
Posts:
1
#1
Releated DesktopBased for validation code
May 6 '14, 12:49 PM
I have given a text box where when i press number key it should validate for number should accept only for Char digit,
so what will validation code ?
chaarmann
Recognized Expert
Contributor
Join Date:
Nov 2007
Posts:
785
#2
May 7 '14, 09:55 AM
Just get the key pressed as char and test that it lies between >='0' and <='9'.
That is the validation code for a positive 1-digit natural number.
What else do you want to test for?
numbers with more than one digit
leading zeros
minus sign
floating point numbers
exponent indicator
complex numbers
Comment
Post
Cancel
Previous
template
Next
Working...
Yes
No
OK
OK
Cancel
👍
👎
☕
Comment