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 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
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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Validator framework - JS validation
 
Similar Threads
Struts Validation Query: How to implement custom validations in struts?
Custom Validation
Validator and two fields
Validator plus my own javascript methods
unable to trigger javascript validation