Dear All, I'm using the commons validator with Struts and want validations to not stop at the first failure, but to run against all fields and so return a set of failures, not just the first one (basically, in a form of 30 fields, if a user gets several wrong, I can see him getting annoyed because on each form submission, the next validation failure is reported, rather than reporting them all at once).
I found an email from Bill Siggelkow <[EMAIL PROTECTED]> on Thu, 12 Aug 2004 16:23:17 GMT (http://mail-archives.apache.org/mod_mbox/jakarta-commons-user/200408.mbox/[EMAIL PROTECTED]) where he hacks the Field class. Wanting a less hacky solution I tried to extend this class, and put it in a package that is not org.apache, but com.my.project and have found several methods and class attributes are either package or private access. I wondered if this was deliberate. Would there be any harm in making private methods protected so they can be extended? Or is a better solution for me to submit a full fix to the org.apache class including letting the validate(Map, Map) method take its cue from the new <set-property property="stopOnFirstError" value="false"/> attribute when the validator is plugged in (which is there for the javcascript as I understand it) (Even so, I would still want to use protected methods, because maybe someone else wants to extend the class...) Or maybe this functionality is already present and I've somehow missed it in my searching. Many thanks, Stewart --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]