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 Can use validator classes within action's validation methods? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Can use validator classes within action Watch "Can use validator classes within action New topic
Author

Can use validator classes within action's validation methods?

Haina Minawa
Ranch Hand

Joined: Oct 13, 2011
Posts: 119
Hi all,

I am wondering whether it is possible or not to instantiate an instance of a validator class (such as EmailValidator class) and using its methods to validate the input? For example:



I have tried the approach above without success.

Any help?

Thanks.
Seetharaman Venkatasamy
Ranch Hand

Joined: Jan 28, 2008
Posts: 5575

Haina Minawa wrote:
I have tried the approach above without success.

Yes, you can use. what is the error message you are getting?
Haina Minawa
Ranch Hand

Joined: Oct 13, 2011
Posts: 119
I got the following exception (full stack trace):

 
jQuery in Action, 2nd edition
 
subject: Can use validator classes within action's validation methods?