Return-Path: Delivered-To: apmail-jakarta-commons-dev-archive@www.apache.org Received: (qmail 8353 invoked from network); 19 Jul 2006 14:08:30 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 19 Jul 2006 14:08:30 -0000 Received: (qmail 9269 invoked by uid 500); 19 Jul 2006 14:08:27 -0000 Delivered-To: apmail-jakarta-commons-dev-archive@jakarta.apache.org Received: (qmail 8933 invoked by uid 500); 19 Jul 2006 14:08:26 -0000 Mailing-List: contact commons-dev-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Jakarta Commons Developers List" Reply-To: "Jakarta Commons Developers List" Delivered-To: mailing list commons-dev@jakarta.apache.org Received: (qmail 8922 invoked by uid 99); 19 Jul 2006 14:08:26 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 19 Jul 2006 07:08:26 -0700 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received: from [209.237.227.198] (HELO brutus.apache.org) (209.237.227.198) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 19 Jul 2006 07:08:25 -0700 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 0CB0B714204 for ; Wed, 19 Jul 2006 14:06:16 +0000 (GMT) Message-ID: <31966207.1153317976048.JavaMail.jira@brutus> Date: Wed, 19 Jul 2006 07:06:16 -0700 (PDT) From: "Niall Pemberton (JIRA)" To: commons-dev@jakarta.apache.org Subject: [jira] Resolved: (VALIDATOR-107) [validator] Only validate rendered form fields MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N [ http://issues.apache.org/jira/browse/VALIDATOR-107?page=all ] Niall Pemberton resolved VALIDATOR-107. --------------------------------------- Fix Version/s: 1.3.0 Release Resolution: Duplicate Re-openned and the set to "Resolved Duplicate" again to correct "resolution" which was lost in Bugzilla --> JIRA conversion > [validator] Only validate rendered form fields > ---------------------------------------------- > > Key: VALIDATOR-107 > URL: http://issues.apache.org/jira/browse/VALIDATOR-107 > Project: Commons Validator > Issue Type: Improvement > Affects Versions: Nightly Builds > Environment: Operating System: Windows XP > Platform: PC > Reporter: Rachel Vanderboom > Priority: Minor > Fix For: 1.3.0 Release > > > All the Javascript validation functions, like validateRequired, do not check to > see if the field that is being validated actually exists on the form. In other > words, they do not do a null check. I know you may be thinking that if the > field is null, then there should be no validation done on that field. However, > I have many pages that have one or more fields that may or may not be rendered > on the page based on whom is logged in. If they are rendered, then they must be > validated; if not, then they obviously do not need to be validated. So > basically, I had to change the javascript functions to ignore fields that are > null so they will be validated if they exist and ignored if they do not. The > current code throws a javascript error if they field does not exist. This seems > like a bug to me. Basically, all I do is the following in the looping of the > validated fields, after the field is declared: > if (field == null) { > continue; > } -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org For additional commands, e-mail: commons-dev-help@jakarta.apache.org