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


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Validator framework - JS validation" Watch "Validator framework - JS validation" New topic
Author

Validator framework - JS validation

Girish Varde
Greenhorn

Joined: Jul 09, 2004
Posts: 23
Hello.
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 - http://raibledesigns.com/page/rd/20030226 , 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.


Merrill
Consultant, Sima Solutions
 
jQuery in Action, 2nd edition
 
subject: Validator framework - JS validation