I am new to Struts 2. I have a form with 2 fields, last name and id. If somebody wants to search the data from the Database by either one of the field, they can enter only one field.I wrote a search-validation.xml with both the fields as required string. In the action class, i am checking if both of them are null, go to input page, otherwise, go to the success page.
On deployment, if I miss one of the fields, it still gives me a field is required message.
Is there anything I should do with the validation.xml file to fix this?
The other option I have is write two forms with 2 actions and 2 validation.xml files. Is that the best route?
P.S: I was checking struts validation and in struts 1.2, they have conditional validation. Could I use that or something like that in Struts 2
Thanks in advance
[ August 08, 2008: Message edited by: Vidya Moorthy ]