Hello all,
When I run the application, it requires to enter Employee number, social, and name. I can enter any letter and number to call employee number, social and name. I do not know how to validate letters and number.
For example, for the employee number, I have to enter number only;
for employee name, I have to enter letter only,
Please give some idea.
Thanks
1 2828
Hello all,
When I run the application, it requires to enter Employee number, social, and name. I can enter any letter and number to call employee number, social and name. I do not know how to validate letters and number.
For example, for the employee number, I have to enter number only;
for employee name, I have to enter letter only,
Please give some idea.
Thanks
Better write a separate class for all the validations and put the validNumber, validString e.t.c methods in there.
For the validations itself you can use exception handling for numbers. Just open the specs for the Integer class and look at the parseInt method. An exception is thrown if the input is not a valid int. Also check out regular expressions.
Sign in to post your reply or Sign up for a free account.
Similar topics
by: deko |
last post by:
I use variables in some links on my page. I need to send these variables so
I can change the color of the links in the navbar when the user is on that
page. If you click around on the site you...
|
by: Dragon |
last post by:
Hi,
I am trying to find out if there is a good (Built-in?) way to validate text
input. I would like to check a textbox to see whether user enter a proper
name (without numbers, symbols etc) or...
|
by: Simon Barnett |
last post by:
Hi,
RE: Converting pages including ASP pages for XHTML
My question relates to ASP not ASP.NET - I can't find a newsgroup for ASP
and hoped it was still relevant in ASP.NET - sorry if it's not....
|
by: Kosmos |
last post by:
Since people have been so helpful on this site I thought I'd contribute what little I can...since I am not a programmer but I'm working on an access database for work
Anyways I had to remove...
|
by: adzir |
last post by:
Hi,
I need to validate password keyed in by the system users so that the
password will contain only letters and numbers plus at least one
capital letter. Exclude these symbols
, < ? / * ( ) &...
|
by: LeWaltz |
last post by:
hi everyone, i am a newbie here, and i have a problem in my programming code...
i wanted to make sure that i can only detect positive numbers, and not letters... examles: "abc", "ab100", "-100",...
|
by: saravanatmm |
last post by:
I need javascript code for validate the email address.
Email address field cannot allowed the capital letters, special characters except '@' symbol.
But can allowed the small letters, numeric...
|
by: vikas1111 |
last post by:
Hi All
I Want to validate password,, the condition is that first 2 letters must be numbers and remaining 4 must be alphabets..How can i solve this ????
|
by: ghjk |
last post by:
I have a web site with several web pages. They are having different number of variables. eg: first page having 4 variables in the form(Name, Phone, ID, Gender)
second page having 10 variables in the...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: aa123db |
last post by:
Variable and constants
Use var or let for variables and const fror constants.
Var foo ='bar';
Let foo ='bar';const baz ='bar';
Functions
function $name$ ($parameters$) {
}
...
|
by: ryjfgjl |
last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
| |