File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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 EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Struts 2 Validation Problem" Watch "Struts 2 Validation Problem" New topic
Author

Struts 2 Validation Problem

Ganapathy palanisamy
Greenhorn

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
Sheriff

Joined: Aug 03, 2008
Posts: 9280
    
  17

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
 
Consider Paul's rocket mass heater.
 
subject: Struts 2 Validation Problem
 
Similar Threads
validation for fck:editor
mask validation rule is not working
validator
validation problem for cost : struts2
xml validator