You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@struts.apache.org by bu...@apache.org on 2004/01/25 14:21:34 UTC
DO NOT REPLY [Bug 26413] New: -
Indexed Field Date Validation Allows Invalid Dates
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