You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Soós Gyula <so...@infostyle.hu> on 2006/03/29 15:04:41 UTC
Struts time-validator
Hi!
At first, sorry for my poor english.
Struts validator is excellent, it makes our work much easier. But I a little
miss one thing: time-validator (not sure this is the correct expression in
english).
In a webapp there are a lot of date field and sometimes it is important to
be a time field (timestamp in the DB). The date-validator is great, but I
couldn't find a time-validator.
Are you guys planning to implement it, or what can You tell to me?
Best Regards,
Gyula Soós
Hungary
Re: Struts time-validator
Posted by Niall Pemberton <ni...@gmail.com>.
http://jakarta.apache.org/commons/validator/apidocs/org/apache/commons/validator/routines/package-summary.html#package_description
As Laurie said though, Struts would need modifying to take advantage of this.
Niall
On 3/29/06, Laurie Harper <la...@holoweb.net> wrote:
> Soós Gyula wrote:
> > Hi!
> >
> > At first, sorry for my poor english.
> >
> > Struts validator is excellent, it makes our work much easier. But I a little
> > miss one thing: time-validator (not sure this is the correct expression in
> > english).
> >
> > In a webapp there are a lot of date field and sometimes it is important to
> > be a time field (timestamp in the DB). The date-validator is great, but I
> > couldn't find a time-validator.
> >
> > Are you guys planning to implement it, or what can You tell to me?
>
>
> If such a thing were to be added, it would be added to the Commons
> Validator on which Struts depends. You could ask on the commons lists
> about adding features to the validator, but the existing date validator
> can probably already do what you need provided you aren't using
> client-side validation.
>
> You can configure the date validator with whatever formatting
> requirements you want, as supported by java.text.SimpleDateFormat.
> SimpleDateFormat supports time fields as well as date fields, so that
> should be enough to do what you want.
>
> If it's not, you'll need to look at writing your own validation rule.
>
> L.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: Struts time-validator
Posted by Laurie Harper <la...@holoweb.net>.
Soós Gyula wrote:
> Hi!
>
> At first, sorry for my poor english.
>
> Struts validator is excellent, it makes our work much easier. But I a little
> miss one thing: time-validator (not sure this is the correct expression in
> english).
>
> In a webapp there are a lot of date field and sometimes it is important to
> be a time field (timestamp in the DB). The date-validator is great, but I
> couldn't find a time-validator.
>
> Are you guys planning to implement it, or what can You tell to me?
If such a thing were to be added, it would be added to the Commons
Validator on which Struts depends. You could ask on the commons lists
about adding features to the validator, but the existing date validator
can probably already do what you need provided you aren't using
client-side validation.
You can configure the date validator with whatever formatting
requirements you want, as supported by java.text.SimpleDateFormat.
SimpleDateFormat supports time fields as well as date fields, so that
should be enough to do what you want.
If it's not, you'll need to look at writing your own validation rule.
L.
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
RE: Struts time-validator
Posted by Ruben Cepeda <ru...@hotmail.com>.
You can use the date validator and make the format string only care about
the time part of the string.
*************************************
Ruben Cepeda
ruben_cepeda@hotmail.com
*************************************
----Original Message Follows----
From: Soós Gyula <so...@infostyle.hu>
Reply-To: "Struts Users Mailing List" <us...@struts.apache.org>
To: <us...@struts.apache.org>
Subject: Struts time-validator
Date: Wed, 29 Mar 2006 15:04:41 +0200
Hi!
At first, sorry for my poor english.
Struts validator is excellent, it makes our work much easier. But I a little
miss one thing: time-validator (not sure this is the correct expression in
english).
In a webapp there are a lot of date field and sometimes it is important to
be a time field (timestamp in the DB). The date-validator is great, but I
couldn't find a time-validator.
Are you guys planning to implement it, or what can You tell to me?
Best Regards,
Gyula Soós
Hungary
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org