Use ValidatorActionForm when you want to key the validation by the Actions i.e. certain fields will be validated if a certain action is called. Suppose you have a big Struts Form which serves as the form for a number of actions e.g. updateClient.do, deleteClient.do, loginClient.do etc.
Suppose your struts form is MyForm.java You want only certain fields to be validated on a call to a particular action. Use ValidatorActionForm. Your entry would look like this in validation.xml: <form name="/updateClient"> <field property="fieldA" depends="required,integer,intRange"> bla...bla... </field> </form> <form name="/deleteClient"> <field property="fieldB" depends="required,integer,intRange"> bla...bla... </field> </form> Whereas if you use ValidatorForm, the entire form would be validated as your entry in validation.xml would look like: <form name="MyForm"> <field property="fieldA" depends="required,integer,intRange"> bla...bla... </field> <field property="fieldB" depends="required,integer,intRange"> bla...bla... </field> </form> Hope that clears things up a bit. Harsh. -----Original Message----- From: pantichd [mailto:[EMAIL PROTECTED] Sent: Thursday, May 25, 2006 1:35 PM To: user@struts.apache.org Subject: ValidatorActionForm vs ValidatorForm Hello, I'm struggling to understand the difference between the ValidatorActionForm and the ValidatorForm. The main difference I find in API is that the key passed into the ValidatorForm "is the action element's 'name' attribute from the struts-config.xml" and the key passed into the ValidatorActionForm "is the action element's 'path' attribute from the struts-config.xml" I understand that part but not the significance. In what situation(s) would I choose one over the other? Thanks in advance for any responses. Sorry for being dense. : ) David. -- View this message in context: http://www.nabble.com/ValidatorActionForm+vs+ValidatorForm-t1682623.html #a4563821 Sent from the Struts - User forum at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]