473,326 Members | 2,125 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,326 software developers and data experts.

Releated DesktopBased for validation code

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 ?
May 6 '14 #1
1 1195
chaarmann
785 Expert 512MB
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
May 7 '14 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Paul Aspinall | last post by:
Hi I want to put all my validation code in one place, for my FormView control, regardless of whether its editing or inserting data. Is there a 'Validation' event somewhere?? or do I point the...
4
by: ss | last post by:
hi, can anybody gives me a sample code where the sql injection attack is validated. how can i do that in business logic layer and pass the error to the presentation tier I want the sample...
1
by: holy moly | last post by:
Hello, the user enters details into a form (values.php) whose action is (insert_values.php), where does the server-side validation code go? (I know other posts on this subject say use...
2
by: karen987 | last post by:
Can someone please tell me how to alter this code if it needs altering, . thanks in advance. 1. The form keeps focusing on "username" and won't submit. The 2 username functions may be clashing?...
3
by: localhost1 | last post by:
i have a serious probem in javascript form validation. i have written a validation code in javascript. it working in internet explorer 7 but the same code is not working in mozilla firefox. what...
1
by: ambi21hs | last post by:
Hi i need a validation code in c for month in the mon-yyyy format 2 embed in between sql so any one help me out with this.. thank you
3
by: ambi21hs | last post by:
i need a validation code in c for employee number, only number should be allowed can any one help me out with dis..
2
by: matt | last post by:
this is my first program in this language ever (besides 'hello world'), can i get a code critique, please? it's purpose is to read through an input file character by character and tally the...
3
by: PrabodhanP | last post by:
I hv following javascript form validation code works in IE but not in Mozilla-Firefox ...please suggest <script type="text/javascript"> function IsNumeric(strString) // check for valid...
0
xarzu
by: xarzu | last post by:
While debugging in C# / Silverlight, how does one output validation code to the output window?
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.