Two Laptop Bag*
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


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
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):

 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Can use validator classes within action's validation methods?