The moose likes Struts and the fly likes Validator framework - JS validation Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Validator framework - JS validation" Watch "Validator framework - JS validation" New topic

Validator framework - JS validation

Girish Varde

Joined: Jul 09, 2004
Posts: 23
When using validator framework for client side field validation, should we add JS validation function to validatior-rules.xml? In Oreilly book, i's given that, JS function is generated. But one post in form link - , it says to add it to the rules file. I am getting confused. Can you please help me understand using JS in validator framework?
Thanks in advance.
Girish Varde
Merrill Higginson
Ranch Hand

Joined: Feb 15, 2005
Posts: 4864
Javascript code is automatically generated for all "out of the box" rules that ship with struts. If you write your own custom rule, you must also write some Javascript validation code to go with it if you expect client-side validation to work with that rule.

Consultant, Sima Solutions
I agree. Here's the link:
subject: Validator framework - JS validation
It's not a secret anymore!