Hi ,

i have a requirement where user has to fill up some kind of questionaire form. 
Questions for a user depends on the "type" of a user.  Questions are basically mutiple 
choice questions and the user can select the correct answer by selecting a radio 
button ( for each question there are five radio buttons each reparesenting a rating 
and the user is supposed to select a rating from 1 to 5 ). So the number of elements 
in the form can change based on the type of user.

Now i want to use struts validation frame work for performing validations. If the user 
leaves any of the answers empty by not selecting the radio button for a question , the 
system should not accept it and report an error displaying the same form with all the 
data entered for the form.

The question is :
How can i use the validation framework to perform validation? Please note that the 
form fields change (based on the user type) so it is not possible for me to associate 
them in "validator.xml"  before hand. Does struts provide any means to validate when 
the form elements are dynamic?

Thanks in advance
Vishy

Reply via email to