Get the tools you need to learn Java skills fast!
Video tutorials, eBooks, hands-on lab exercises, sample code.
Get started
The moose likes Struts and the fly likes Struts 2 Validation Problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of The Software Craftsman this week in the Agile forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Struts 2 Validation Problem" Watch "Struts 2 Validation Problem" New topic

Struts 2 Validation Problem

Ganapathy palanisamy

Joined: May 29, 2008
Posts: 22
Dear friends,
I am working with struts2.0 for the validation I am using this validator. Its working fine for the name. But I want to put two name in a same text box. But it is not allowing. It allows only one name without space. Now i want the key code for using space between the name.

Thanks in Advance.

Ankit Garg

Joined: Aug 03, 2008
Posts: 9327

So you want to allow characters and spaces in a name? Like would the name "Abc K Xyz" be valid? If it would, then you just have to include \\s in the expression to allow space characters i.e. [a-zA-Z\\s]+$ ...

SCJP 6 | SCWCD 5 | Javaranch SCJP FAQ | SCWCD Links
Have you tried LearnNowOnline?
subject: Struts 2 Validation Problem