Im about to go insane! I have a ValidatorForm called UserDetailsForm ... within that form I have two bean UserAccountDetailsBean and PersonalDetailsBean ... inside the PersonalDetailsBean is a List of EmailAddressBean's and a property of the EmailAddressBean is a public String emailAddress .... How on God's earth can I validate that that property is a valid email and required for every instance of EmailAddressBean contained in the List using validator.xml I have tried so many things Im starting to go mad see code below:
Officially, Struts doesn't support validation for indexed properties. However, I have a feeling the following might work:
I'm pretty sure this will at least validate the first element of the collection, but I have had others tell me that it will also validate the other elements as well. I don't have time right now to test it for myself, but if you're willing to be a "guinea pig", give it a try and tell us whether it works for all elements or not.