In my application i am using struts 1.3 framework.I am validating the form through xml.I have used the same form in many pages since my inputs are nearly same in all the pages.In one page i need to validate only 4 fields(say) and in another page i need to validate 8 fields.I have validated all the fields in validation.xml.
I am submitting a form with 4 fields to be validated but in xml i have validated 8 fields.So ActionErrors are not empty and the same page loads again.What i need to to validate only the 4 fields and load a new page that is specified.Any way to achieve this? I have googled out but i could not make it.Any help is appreciated.
the one approach is to separate the common fields put it in parent form which child can access. Give the default values to parent form field which are not necessary for the valdiation and keep the validation on the child field.you need to extend the parent form . I dont know whether it will be fit for your design or not.
Second is common define fields in valiation.xml for each form.