aspose file tools*
The moose likes Struts and the fly likes Creating a time mask for validation Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Creating a time mask for validation" Watch "Creating a time mask for validation" New topic
Author

Creating a time mask for validation

Gran Roguismo
Ranch Hand

Joined: Mar 10, 2005
Posts: 77
I would like to validate a time mask of the format HH:MM:SS:T
hour:minute:second:time(as in normal or daylight savings)
I see the dateformat rules in validation, but I don't understand how it works.
Where should I start?


EOL
Marc Peabody
pie sneak
Sheriff

Joined: Feb 05, 2003
Posts: 4727

Start Here

use the date validation with the datePatternStrict.

See the user guide for more info.
[ March 30, 2005: Message edited by: Marc Peabody ]

A good workman is known by his tools.
Gran Roguismo
Ranch Hand

Joined: Mar 10, 2005
Posts: 77
thanks marc, giving it a try now
Ken Loh
Ranch Hand

Joined: Feb 16, 2005
Posts: 190
Hi Marc,

The mask uses some sort of regular expression. Is there somewhere which one can find out the syntax used ? Or does he need to refer to

http://www.unicode.org/unicode/reports/tr18/ or http://java.sun.com/j2se/1.4.2/docs/api/java/util/regex/Pattern.html ?

Cheers,
Ken

Originally posted by Marc Peabody:
Start Here

use the date validation with the datePatternStrict.

See the user guide for more info.

[ March 30, 2005: Message edited by: Marc Peabody ]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Creating a time mask for validation