This week's book giveaway is in the Android forum.
We're giving away four copies of Head First Android and have Dawn & David Griffiths on-line!
See this thread for details.
The moose likes Java in General and the fly likes Validating input BOX Help!!!!! Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Head First Android this week in the Android forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "Validating input BOX Help!!!!!" Watch "Validating input BOX Help!!!!!" New topic
Author

Validating input BOX Help!!!!!

joe kane
Greenhorn

Joined: Jan 26, 2004
Posts: 29
Hi all,
Hi,
I was wondering how do you validate an inputbox so that only letters can be entered?


I know this validates it so only number can be entered, but what for the other way around?
Thanks loads in advance
Joe Kane
Jeanne Boyarsky
author & internet detective
Marshal

Joined: May 26, 2003
Posts: 32310
    
213

Joe,


[OCA 8 book] [Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
Jeanne Boyarsky
author & internet detective
Marshal

Joined: May 26, 2003
Posts: 32310
    
213

Joe,
Also if you look in the Pattern class in the API, you will find some predefined character classes. Digits are \d and alphanumeric is \w.
joe kane
Greenhorn

Joined: Jan 26, 2004
Posts: 29
Thanks for that Jeanne.....
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Validating input BOX Help!!!!!
 
jQuery in Action, 3rd edition