Have you looked at the visitor validator? It might serve your purposes if the fields are on objects in the action.

/Ian

Arup Francis wrote:
Hi,

   We have this problem of having to repeat certain validations for the same
fields in multiple validation xml files because they occur in multiple
scenarios and we have different validation files for the different
scenarios. Now this brings about duplication of code in the sense that in
future if I need to modify the validation for the fields then I have to do
it in multiple files which is quite a pain. I was thinking that if it was
possible to have the ability to include one validation file within another
validation xml then it would help us in removing the duplication of code
because I could define the validation for the fields in a single file and
then include that file in the multiple scenario validation files.

Its something like the <s:include /> that you have for the struts.xml using
which you can include other struts configuration files.

Struts 2 gurus - Please let me know on what you feel about this.
Maybe this can be added as an enhancement in future versions of struts2.

Arup

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to