I have a text field and a selectbox (users can select multiple values by ctrl) in a form.
I was reading validation provided by struts2: http://struts.apache.org/2.x/docs/validation.html
However, it doesnt seem to have the validation I need.
I want to make the text field a required field ONLY when certain strings are selected from the selectbox.
Do I have to write a custom validator for this purpose or is there a simpler way to achieve this in struts2.
thanks!
PS: I would like to know how other languages/frameworks might handle this case also.