File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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
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: 9466

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
I agree. Here's the link:
subject: Struts 2 Validation Problem
jQuery in Action, 3rd edition