This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
I've tried google but can't seem to find anything on this.
Is it possible to pass a string array in <var-value>. For example something like this (though this doesn't work).
I want to check if any of the fields I'm passing is filled in. And if so they must all be filled in. I can do seperate checks on each one but then I get mutliple(redundant) error messages, so I'd like to pass the array and loop through it in my validator-rules.xml, therefore only having one standard error message if any of them fail.
In general, if I have validation that is slightly complex I just implement the validate method and write it in Java. Be sure to call super.validate.
The validator framework actually calls get methods on your ActionForm, correct? Maybe you could add a getMailingFields method to your form that returns an empty string if any of the fields are empty and then create a validation rule on mailingFields.
If you are using Dynamic forms, then this may not apply.