Return-Path: Delivered-To: apmail-struts-user-archive@www.apache.org Received: (qmail 87240 invoked from network); 6 Dec 2009 21:22:56 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 6 Dec 2009 21:22:56 -0000 Received: (qmail 21487 invoked by uid 500); 6 Dec 2009 21:22:53 -0000 Delivered-To: apmail-struts-user-archive@struts.apache.org Received: (qmail 21391 invoked by uid 500); 6 Dec 2009 21:22:52 -0000 Mailing-List: contact user-help@struts.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: 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 21381 invoked by uid 99); 6 Dec 2009 21:22:52 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 06 Dec 2009 21:22:52 +0000 X-ASF-Spam-Status: No, hits=-2.6 required=5.0 tests=BAYES_00 X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of lists@nabble.com designates 216.139.236.158 as permitted sender) Received: from [216.139.236.158] (HELO kuber.nabble.com) (216.139.236.158) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 06 Dec 2009 21:22:50 +0000 Received: from isper.nabble.com ([192.168.236.156]) by kuber.nabble.com with esmtp (Exim 4.63) (envelope-from ) id 1NHOYn-0000Z4-HW for user@struts.apache.org; Sun, 06 Dec 2009 13:22:29 -0800 Message-ID: <26669216.post@talk.nabble.com> Date: Sun, 6 Dec 2009 13:22:29 -0800 (PST) From: nguyenlinh To: user@struts.apache.org Subject: Re: RequiredFieldValidator and error message from property file via key In-Reply-To: <74a2042d0912040704i1e4e6583g3ab00c87de8ef88b@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Nabble-From: nguyenlinh.mail@gmail.com References: <8141dfcc0912040225n2abfb1d6h435533b154d15bfa@mail.gmail.com> <74a2042d0912040704i1e4e6583g3ab00c87de8ef88b@mail.gmail.com> Hello, I have the same problem. So what kind of validator should I use if I have a field of type int and I want to make sure the user typed a number? Thanks, Linh Greg Lindholm-2 wrote: > > You may have a different problem then you think; > > The @RequiredFieldValidator does not make any sense on a int > (primitive) field as an int cannot be null. The validation interceptor > checks the values on the fields after params interceptor sets the > fields. The RequiredFieldValidator checks if the field is null which > will never be the case for a primitive field. > > -- View this message in context: http://old.nabble.com/RequiredFieldValidator-and-error-message-from-property-file-via-key-tp26640581p26669216.html Sent from the Struts - User mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@struts.apache.org For additional commands, e-mail: user-help@struts.apache.org