Bhaarat Sharma wrote:
thanks dave!

<s:fielderror/> worked fine.  I was trying too many things so got confused.

I have one further question regarding validation.  Is it possible to
validate a text field only when certain strings are selected from the
multiple drop down box.

Basically I want to make the text feild required only when some
strings are selected from the multiple drop down box, which is in the
same form as the text field.  Can this be done via struts2 validation
or do I have to write a custom validator for this?

I'd expect it could be handled with an expression validator; whether or not this is the cleanest solution is arguable. Once validation gets more complicated than a single expression or two doing it in Java may end up being easier to understand and maintain. There's no reason declarative and programmatic validation can't be combined.

Dave


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org

Reply via email to