Return-Path: Delivered-To: apmail-struts-dev-archive@www.apache.org Received: (qmail 14774 invoked from network); 29 May 2006 07:17:12 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 29 May 2006 07:17:12 -0000 Received: (qmail 91054 invoked by uid 500); 29 May 2006 07:17:06 -0000 Delivered-To: apmail-struts-dev-archive@struts.apache.org Received: (qmail 90876 invoked by uid 500); 29 May 2006 07:17:05 -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 90811 invoked by uid 99); 29 May 2006 07:17:05 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 29 May 2006 00:17:05 -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; Mon, 29 May 2006 00:17:04 -0700 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id E42D07142F0 for ; Mon, 29 May 2006 07:16:16 +0000 (GMT) Message-ID: <18486947.1148886976931.JavaMail.jira@brutus> Date: Mon, 29 May 2006 07:16:16 +0000 (GMT+00:00) From: "thomas bailey (JIRA)" To: issues@struts.apache.org Subject: [jira] Updated: (STR-2880) Validating array integers In-Reply-To: <28357704.1148886976795.JavaMail.jira@brutus> 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/struts/browse/STR-2880?page=all ] thomas bailey updated STR-2880: ------------------------------- Description: There seems to be some issue with validating arrays on integers: html: should work should work as well this will fail validation actionform: public class PropertyFilter implements Serializable { private String[] types; public String[] getTypes() { return types; } public void setTypes(String[] types) { this.types = types; } } validation.xml:
Even if all values are integer, it will fail validation regardless. According to http://www.strutskickstart.com/IndexedPropertiesandValidation.ppt#18 I should do something like: This time, it does indeed check all the values are of type integer, however, if you do not select anything (the field is not required) the result is: java.lang.NullPointerException org.apache.commons.validator.Field.getIndexedProperty(Field.java:796) org.apache.commons.validator.Field.validate(Field.java:891) .. Also having scoured all documentation in current and future builds and there is no example of validating an integer array. was: html: should work should work as well this will fail validation actionform: public class PropertyFilter implements Serializable { private String[] types; public String[] getTypes() { return types; } public void setTypes(String[] types) { this.types = types; } } validation.xml:
Even if all values are integer, it will fail validation regardless. According to http://www.strutskickstart.com/IndexedPropertiesandValidation.ppt#18 I should do something like: This time, it does indeed check all the values are of type integer, however, if you do not select anything (the field is not required) the result is: java.lang.NullPointerException org.apache.commons.validator.Field.getIndexedProperty(Field.java:796) org.apache.commons.validator.Field.validate(Field.java:891) .. Also having scoured all documentation in current and future builds and there is no example of validating an integer array. > Validating array integers > ------------------------- > > Key: STR-2880 > URL: http://issues.apache.org/struts/browse/STR-2880 > Project: Struts Action 1 > Type: Bug > Components: Unknown > Versions: 1.2 Family > Reporter: thomas bailey > > There seems to be some issue with validating arrays on integers: > html: > > should work > should work as well > this will fail validation > > actionform: > public class PropertyFilter implements Serializable > { > private String[] types; > > public String[] getTypes() { > return types; > } > public void setTypes(String[] types) { > this.types = types; > } > } > validation.xml: > > >
> > > > > >
>
> Even if all values are integer, it will fail validation regardless. According to http://www.strutskickstart.com/IndexedPropertiesandValidation.ppt#18 I should > do something like: > > > > > > This time, it does indeed check all the values are of type integer, however, > if you do not select anything (the field is not required) the result is: > > java.lang.NullPointerException > org.apache.commons.validator.Field.getIndexedProperty(Field.java:796) > org.apache.commons.validator.Field.validate(Field.java:891) > .. > Also having scoured all documentation in current and future builds and there is no example of validating an integer array. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/struts/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira