struts-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 26413] New: - Indexed Field Date Validation Allows Invalid Dates
Date Sun, 25 Jan 2004 13:21:34 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=26413>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=26413

Indexed Field Date Validation Allows Invalid Dates

           Summary: Indexed Field Date Validation Allows Invalid Dates
           Product: Struts
           Version: 1.1 Final
          Platform: Other
        OS/Version: Other
            Status: NEW
          Severity: Major
          Priority: Other
         Component: Validator Framework
        AssignedTo: struts-dev@jakarta.apache.org
        ReportedBy: niall.pemberton@blueyonder.co.uk


There is a problem when validating indexed fields with the "date" rule when its 
an 'optional' field.

As soon as validator finds a field which has nothing input, it stops validating 
any further occurances of that indexed field. If there are errors in the 
indexed field, but after an "empty" occurance then no error messages are 
generated for it and if the rest of the page is valid, validation passes OK.

The problem is that if nothing is entered then the FieldChecks.validateDate() 
method returns null. The Validator.validateField() method considers a "null" 
return value as invalid and so stops processing any further occurances of that 
indexed field.

One possible solution would be to return Boolean(true) or Boolean(false) from 
the FieldChecks.validateDate() method, rather than the date that has been 
parsed.

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


Mime
View raw message