You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by akash agrawal <ak...@yahoo.co.uk> on 2008/03/07 20:21:25 UTC

selective validation using validation.xml

Hi,

Is this possible to do selective validation using validation.xml? What I meant by this is that calling a different set of validation on each(different) invocation of same action and same method.

Example: I call UpdateAction and update method and use UpdateAction-validation.xml and want to validate different set of validation of invocation based on my application requirement.
1. Put validation for field A and B in xml file
2. validate field A but not field B on one invocation.
3. validate field B but not field A on other involcation.

Thanks,

-Akash

       
---------------------------------
Be a better friend, newshound, and know-it-all with Yahoo! Mobile.  Try it now.

Re: selective validation using validation.xml

Posted by ravi_eze <ra...@ivycomptech.com>.


akash agrawal-2 wrote:
> 
> Hi,
> 
> Is this possible to do selective validation using validation.xml? What I
> meant by this is that calling a different set of validation on
> each(different) invocation of same action and same method.
> 
> Quite possible: in that case u would write valildation as: < ActionClass
> >-< action name mentioned in struts.xml>-validation.xml. 
> 
> Example: I call UpdateAction and update method and use
> UpdateAction-validation.xml and want to validate different set of
> validation of invocation based on my application requirement.
> 1. Put validation for field A and B in xml file
> 2. validate field A but not field B on one invocation.
> 3. validate field B but not field A on other involcation.
> 
> possible: in fact you can write custom interceptors which finally fill up
> action errors and field errors to their end. Include this btw validation
> interceptor and workflow interceptor in your xml file. 
> 
> Thanks,
> 
> -Akash
> 
>        
> ---------------------------------
> Be a better friend, newshound, and know-it-all with Yahoo! Mobile.  Try it
> now.
> 

-- 
View this message in context: http://www.nabble.com/selective-validation-using-validation.xml-tp15903866p16044494.html
Sent from the Struts - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org