You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Derek Richardson <De...@appiancorp.com> on 2004/03/18 00:56:53 UTC

Map-backed Forms and Struts Validator

Read through the various Struts validator docs and the map-backed form faq but didn't see this. James Turner's "Indexed Properties and Validation" presentation (http://www.strutskickstart.com/IndexedPropertiesandValidation.ppt) came close, but still not explicit enough for me to figure out. :(

Struts 1.1. Uses Commons Validator 1.0.2.

Is it possible to use the Struts validator to validate beans stored in a map-backed form? If so, does anyone have an example at-hand to send me?

Thanks,

Derek Richardson

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


Re: Map-backed Forms and Struts Validator

Posted by Adam Hardy <ah...@cyberspaceroad.com>.
Hi Derek,

from the ppt doc, it looks like validWhen is using a syntax that is 
designed for checking indexed properties. I haven't used it though.

I assume that it would handle nested beans as well, in accordance with 
the rest of the action form functionality. But again, I don't know.

Also it says you can't use validWhen until you upgrade to struts 1.2 or 
a nightly build.

I admit, it doesn't look hopeful. Have you tried a simple test case 
using the syntax like in the ppt doc?

Adam


On 03/18/2004 12:56 AM Derek Richardson wrote:
> Read through the various Struts validator docs and the map-backed
> form faq but didn't see this. James Turner's "Indexed Properties and
> Validation" presentation
> (http://www.strutskickstart.com/IndexedPropertiesandValidation.ppt)
> came close, but still not explicit enough for me to figure out. :(
> 
> Struts 1.1. Uses Commons Validator 1.0.2.
> 
> Is it possible to use the Struts validator to validate beans stored
> in a map-backed form? If so, does anyone have an example at-hand to
> send me?



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