You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by bu...@apache.org on 2004/05/22 01:13:33 UTC

DO NOT REPLY [Bug 29151] New: - Allow validators to register errors for multiple fields

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=29151>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=29151

Allow validators to register errors for multiple fields

           Summary: Allow validators to register errors for multiple fields
           Product: Commons
           Version: Nightly Builds
          Platform: Other
        OS/Version: Other
            Status: NEW
          Severity: Enhancement
          Priority: Other
         Component: Validator
        AssignedTo: commons-dev@jakarta.apache.org
        ReportedBy: mrdon@twdata.org


Struts validators explicitly pass in an ActionErrors instance to allow
validators to record their own results.  While I'm not convinced that is a good
idea for most validations, it does allow a validator to register validation
errors for other fields than the one currently being processed.

For example, perhaps there was an XML schema validator to validate an XML
element.  The schema validator is going to report multiple validator errors all
at the same time.  This patch would allow that validator to register those
errors even though Validator hasn't processed or has already processed those fields.

The patch puts both the current Form and ValidationResults in the Validator's
parameters allowing a validator to specify those objects to be passed in as a
parameter during validation.

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