This week's giveaway is in the EJB and other Java EE Technologies forum.
We're giving away four copies of EJB 3 in Action and have Debu Panda, Reza Rahman, Ryan Cuprak, and Michael Remijan 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 EJB 3 in Action this week in the EJB and other Java EE Technologies 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
internet detective
Marshal

Joined: May 26, 2003
Posts: 29219
    
135

Joe,


[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
internet detective
Marshal

Joined: May 26, 2003
Posts: 29219
    
135

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.....
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Validating input BOX Help!!!!!
 
Similar Threads
Letters only in JOptionPane?
Only allow Strings to be Scanned with scanner.
Struts Layout Datagrid Validation
using convertor in jsf
Validating Strings in JTextFields