Return-Path: Delivered-To: apmail-struts-user-archive@www.apache.org Received: (qmail 39940 invoked from network); 6 May 2005 15:25:22 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 6 May 2005 15:25:22 -0000 Received: (qmail 73951 invoked by uid 500); 6 May 2005 15:16:00 -0000 Delivered-To: apmail-struts-user-archive@struts.apache.org Received: (qmail 73447 invoked by uid 500); 6 May 2005 15:15:47 -0000 Mailing-List: contact user-help@struts.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Struts Users Mailing List" Reply-To: "Struts Users Mailing List" Delivered-To: mailing list user@struts.apache.org Received: (qmail 73400 invoked by uid 99); 6 May 2005 15:15:45 -0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: neutral (hermes.apache.org: local policy) Received: from workstation5.qas.com (HELO mail3.qas.com) (195.172.82.5) by apache.org (qpsmtpd/0.28) with ESMTP; Fri, 06 May 2005 08:15:45 -0700 Received: from orion.qas.com (orion.qas.com) by mail3.qas.com (Content Technologies SMTPRS 4.3.17) with ESMTP id for ; Fri, 6 May 2005 16:12:08 +0100 X-MimeOLE: Produced By Microsoft Exchange V6.0.6603.0 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Subject: Validator not plugging in keyed values Date: Fri, 6 May 2005 16:12:07 +0100 Message-ID: <5684A7E6FB10504393A2806C1F4C021005AF8837@orion.qas.com> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: Validator not plugging in keyed values Thread-Index: AcVSTfgmNwR+6+HsSOWIoc0gW7z91g== From: "Allistair Crossley" To: X-Virus-Checked: Checked X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Hello Again, Having a spot of bother with validating an ActionForm. It's all setup and I= believe accurately.=20 I have 2 text fields. Each are specified as needing the required rule. I do= not ask my action mapping to validate.=20
Instead I run the validation in an Action class ActionMessages errors =3D form.validate(); I log the output of this, and I accurately get 1 error or 2 errors accordin= g to whether I left one or two fields blank in my form. So that's fine. I s= ave the errors container using saveErrors(request, errors) and back in the = JSP:
    =20
  • =20
=20
This, too, works to some extent. In my ApplicationResources, I have: errors.required=3D{0} is required. test.field.key=3DSome random value test.field2.key=3DSome random value 2 The problem I am seeing is that when my form validates, all I get back are = bullet points with=20 - is required which is the errors.required key's value. That is, test.field.key's value i= s not being inserted into the {0} placeholder of the errors.required value.= =20 Like I say, everything is working in terms of the system spotting I have er= rors according to the rule, and the messages are being found by validator b= ecause it finds "is required". But the error is that is does not pump in th= e value from the custom key. Any helpers? Cheers, Allistair. =20 ------------------------------------------------------- QAS Ltd. Developers of QuickAddress Software www.qas.com Registered in England: No 2582055 Registered in Australia: No 082 851 474 ------------------------------------------------------- --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@struts.apache.org For additional commands, e-mail: user-help@struts.apache.org