File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Struts and the fly likes validator framework Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "validator framework" Watch "validator framework" New topic

validator framework

pavanasree vasireddy
Ranch Hand

Joined: Jun 12, 2004
Posts: 34

I am using validator framework in my application. For client side validations I am writing the code validation-rules.xml. I would like to display the error messages which are defined in the application resources.
please let me know whether it is possible or not?

thanks in advance.
David Hibbs
Ranch Hand

Joined: Dec 19, 2002
Posts: 374
There should be a basic implementation of the rules file that came with your struts or validator distribution. If you notice, it indeed uses properties specified in the -- so long as you specified it in your struts-config.xml file, anyway!


Note the msg="errors.required" attribute.

"Write beautiful code; then profile that beautiful code and make little bits of it uglier but faster." --The team, Newsletter 039.
pavanasree vasireddy
Ranch Hand

Joined: Jun 12, 2004
Posts: 34

Thanks for the reply.

I agree that "msg" attribute use ApplicationResources properties. In my application i would like to use javascript validations. I writing my javscript validations in the <javascript> tag in validation-rules.xml. I want to display the alert messages using application resources.
Vijay Vaddem
Ranch Hand

Joined: Feb 13, 2004
Posts: 243
Probably the following article would be helpful...
I agree. Here's the link:
subject: validator framework
It's not a secret anymore!