Return-Path: Delivered-To: apmail-jakarta-struts-dev-archive@www.apache.org Received: (qmail 49078 invoked from network); 25 Jan 2004 13:21:30 -0000 Received: from daedalus.apache.org (HELO mail.apache.org) (208.185.179.12) by minotaur-2.apache.org with SMTP; 25 Jan 2004 13:21:30 -0000 Received: (qmail 40844 invoked by uid 500); 25 Jan 2004 13:21:22 -0000 Delivered-To: apmail-jakarta-struts-dev-archive@jakarta.apache.org Received: (qmail 40734 invoked by uid 500); 25 Jan 2004 13:21:21 -0000 Mailing-List: contact struts-dev-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Struts Developers List" Reply-To: "Struts Developers List" Delivered-To: mailing list struts-dev@jakarta.apache.org Received: (qmail 40721 invoked from network); 25 Jan 2004 13:21:21 -0000 Received: from unknown (HELO exchange.sun.com) (192.18.33.10) by daedalus.apache.org with SMTP; 25 Jan 2004 13:21:21 -0000 Received: (qmail 4861 invoked by uid 50); 25 Jan 2004 13:21:34 -0000 Date: 25 Jan 2004 13:21:34 -0000 Message-ID: <20040125132134.4860.qmail@nagoya.betaversion.org> From: bugzilla@apache.org To: struts-dev@jakarta.apache.org Cc: Subject: DO NOT REPLY [Bug 26413] New: - Indexed Field Date Validation Allows Invalid Dates X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT . 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