From issues-return-5738-apmail-struts-issues-archive=struts.apache.org@struts.apache.org Tue Jul 03 03:40:49 2007 Return-Path: Delivered-To: apmail-struts-issues-archive@locus.apache.org Received: (qmail 88159 invoked from network); 3 Jul 2007 03:40:49 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 3 Jul 2007 03:40:49 -0000 Received: (qmail 10167 invoked by uid 500); 3 Jul 2007 03:40:49 -0000 Delivered-To: apmail-struts-issues-archive@struts.apache.org Received: (qmail 10130 invoked by uid 500); 3 Jul 2007 03:40:49 -0000 Mailing-List: contact issues-help@struts.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@struts.apache.org Delivered-To: mailing list issues@struts.apache.org Received: (qmail 10120 invoked by uid 99); 3 Jul 2007 03:40:49 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 02 Jul 2007 20:40:49 -0700 X-ASF-Spam-Status: No, hits=-100.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO brutus.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 02 Jul 2007 20:40:46 -0700 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 402537141EC for ; Mon, 2 Jul 2007 20:40:26 -0700 (PDT) Message-ID: <7316249.1183434026260.JavaMail.jira@brutus> Date: Mon, 2 Jul 2007 20:40:26 -0700 (PDT) From: "Paul Benedict (JIRA)" To: issues@struts.apache.org Subject: [jira] Closed: (STR-1955) [validator] automate maxlength validations MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/struts/browse/STR-1955?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Paul Benedict closed STR-1955. ------------------------------ Resolution: Won't Fix Assignee: (was: Struts Developers) > [validator] automate maxlength validations > ------------------------------------------ > > Key: STR-1955 > URL: https://issues.apache.org/struts/browse/STR-1955 > Project: Struts 1 > Issue Type: Improvement > Components: Core > Affects Versions: 1.1 Final > Environment: Operating System: other > Platform: Other > Reporter: Ralf Hauser > Priority: Minor > > It appears to be good practice to execute a maxlength validation for all form > fields, especially the ones eventually ending up in a database. > To save the programmer all the configuration writing chores, I suggest to > automate this in the following way: > Assume there is a registration form with the field "private String loginName;" - > if there is also > a) int loginName_maxLength = 60; //adapt value to permitted field length in DB > b) the below global "automateMaxLength" is set to "true" > then > i) always execute the "maxlength" validation rule (no need to list that in > validation.xml) > ii) always amend the ' registration form with 'maxlength="60"' as per > http://jakarta.apache.org/struts/userGuide/struts-html.html#text > and > iii) if the below "autoOnChangeJS" is "true", amend the same ' property="loginName"' with an > 'onchange="MODAL_MAX_LENGHT_AUTOGENERATED_JAVA_SCRIPT"' for those who expect > their visitors to have JavaScript enabled. > The configuration block in the struts-config.xml thus should be enhanced with > two properties: > > ... > > > ... > -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.