Return-Path: Delivered-To: apmail-struts-dev-archive@www.apache.org Received: (qmail 92387 invoked from network); 12 Sep 2004 20:41:45 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 12 Sep 2004 20:41:45 -0000 Received: (qmail 85464 invoked by uid 500); 12 Sep 2004 20:41:41 -0000 Delivered-To: apmail-struts-dev-archive@struts.apache.org Received: (qmail 85147 invoked by uid 500); 12 Sep 2004 20:41:39 -0000 Mailing-List: contact dev-help@struts.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 dev@struts.apache.org Received: (qmail 85133 invoked by uid 99); 12 Sep 2004 20:41:39 -0000 X-ASF-Spam-Status: No, hits=-2.8 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [209.237.227.194] (HELO minotaur.apache.org) (209.237.227.194) by apache.org (qpsmtpd/0.28) with SMTP; Sun, 12 Sep 2004 13:41:39 -0700 Received: (qmail 92346 invoked by uid 1339); 12 Sep 2004 20:41:37 -0000 Received: from localhost (sendmail-bs@127.0.0.1) by localhost with SMTP; 12 Sep 2004 20:41:37 -0000 Date: Sun, 12 Sep 2004 13:41:37 -0700 (PDT) From: Martin Cooper To: dev@struts.apache.org Subject: Bug in Struts Validator Message-ID: <20040912133159.K90166@minotaur.apache.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Spam-Rating: localhost 1.6.2 0/1000/N X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N There appears to be a bug in the way that the error messages are put together in the validator code. The problem shows up in both the server side and client side messages, and I suspect appears only for messages that have more than one argument. The easiest way to see the problem is in the registration tests in the validator module of the struts-examples app. If you just stick an "a" in every field and click Save, you'll see: o 5 can not be less than null characters. o Zip is invalid. o Phone is invalid. o E-mail is an invalid e-mail address. The first of these is clearly wrong, and should have read "First Name can not be less than 5 characters". Somehow the field name seems to have been missed from the args. I've taken a quick look at the code, and don't see where things are going wrong, so I'm hoping someone more familiar with that code could take a quick look also, and see if they can spot the problem. -- Martin Cooper --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org For additional commands, e-mail: dev-help@struts.apache.org