struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Paul Benedict" <pbened...@apache.org>
Subject Re: Date validation (month and day)
Date Thu, 06 Sep 2007 00:10:33 GMT
You may be able to do it with a very complex validwhen validation. However,
in these instances, it's best to write your own validator.

Paul

On 9/5/07, Laurie Harper <laurie@holoweb.net> wrote:
>
> Hiroyuki Suzuki wrote:
> > ello guys!
> >
> > How would I check my date input so that it will validate
> > the maximum days per month.
> > For example:
> > Jan, Mar, May, Aug, Oct, Dec (31 days)
> > April, June,Sept, Nov (30 days)...
> >
> > Please share me your ideas..
> >
> > Addtional: Separate field name for month and day.
>
> There's no built-in validation rule that will do that in either Struts1
> or Struts2. It would probably be easiest to handle in your validate()
> method, but if you want to do it declaratively (in XML) you'll have to
> use conditional validation and some futzing around.
>
> Which version of Struts are you using?
>
> L.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message