thanks for the advise . much appreciated. josh
On Wed, 26 Jan 2005 19:14:06 +0000, Ruben Cepeda <[EMAIL PROTECTED]> wrote: > Hello Josh, > > I have a thought about your problem with the "exception" thrown by Tomcat at > the command line. The first is that it might not be an exception it might > just be the some kind of log. Also as a side note you make sure that the > hidden field that is collecting the whole date is doing what it should be > doing. I have come accross a problem where I was doing something simplier > and I have trusting that the value that the drop-down menu was sending was > correct. > > As for making custom validator in my view that is the way to go for a couple > of reasons. First reason is clarity it is a lot more clear to have a custom > validator that to have an hidden field. Also the custom validator should be > pretty easy to do because you could use the original date validator as a > tool. > > ************************************* > Ruben Cepeda > [EMAIL PROTECTED] > ************************************* > > ----Original Message Follows---- > From: j o s h ! <[EMAIL PROTECTED]> > Reply-To: j o s h ! <[EMAIL PROTECTED]> > To: user@struts.apache.org > Subject: Trying to understand Validate Date > Date: Wed, 26 Jan 2005 18:01:39 +0800 > > Hi > > I am new to struts and got 2 questions > > 1/ I am trying to understand if the behaviour I am getting from a date > validation is right...when I put in an invalid date on my > DynaValidatorForm, say 31/11/2000, I get an error (correctly) on the > input field. Validation is working as it should. But I get an > exception on the Tomcat console... > > input date 31/11/2001 > 26-Jan-2005 17:43:44 org.apache.commons.validator.GenericTypeValidator > formatDate > WARNING: 31/11/2001 > java.text.ParseException: Unparseable date: "31/11/2001" ..... > > Is this a normal behaviour? shouldn't this exception be caught within > validateDate? > > 2/ I am using a subclass of DynaValidatorForm. And have 3 drop down > boxes for Day, Month and Year. In order to make use of the date > validator in struts, I have a additional hidden field that > concatenates these 3 fields into one in the validate() method. Should > this be defined as a pluggable validator instead? > > Thanks for any advise. > > Josh > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]