joea88 wrote:
I've an action class like below. I put the skipvalidation annotation because
I don't want strut to validate all annotated fields. My problem is that I
still want to do the validation for 'name' field.
So.. is there a way to manually invoke only certain fields' annotation
validation? I could check whether the 'name' field is empty or not in my
'execute' action, but that would be duplicating code and you don't really
want to do that when you have many fields in your class.

So you want to skip validation except when you don't?

I'm not aware of any mechanism that allows partial validation. If you're trying to validate certain fields under certain conditions then IMO annotations aren't the best way to do it, particularly if you have a bunch of different methods that require different validation logic.

Dave


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

Reply via email to