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/04/04 19:00:32 UTC

DO NOT REPLY [Bug 28190] New: - [Validator] Url Validation Error Codes

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=28190>.
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=28190

[Validator] Url Validation Error Codes

           Summary: [Validator] Url Validation Error Codes
           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: niall.pemberton@blueyonder.co.uk


I am attaching a patch which adds the ability for the UrlValidator to return an 
error code indicating what part of the url validation failed (following a 
discussion on struts developers list).

The existing isValid(value) method still works returning true/false.

I have added isValid(Object value, boolean expandedCode) method which returns 
an integer code.

If expandedCode is false it returns a code indicating which part of the url is 
invalid (general format, scheme, authority, path, query or fragment).

If expandedCode is true it returns a more detailled code indicating a more 
specific error with the url.

I have run the existing validator tests which all passed. If your happy with 
this change, I will submit a patch to the tests which check the specific code 
returned.

Niall

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