Time field validation

2005-02-21 Thread Lucas HĂșngaro
Hi everyone. I need a way to validate a time field in a jsp page using the Struts framework... I've already did it with dates and other formats, but I'm searching for a way to validate time fields and found nothing. The form have two time fields, and the format is HH:mm:ss. If anyone can help me

Date Time field validation

2004-05-17 Thread Ivan
Hi, I have a form field representing a date in the format dd/MM/ HH:mm (14/05/2004 13:03) My problem is that validator cannot handle time in its date validations rutines. Neither using mask validation with the regular expression ^\d{2}/\d{2}/\d{4} \d{2}:\d{2}$ works, because it throw a jav

Re: Date Time field validation

2004-05-17 Thread Dean A. Hoover
I'm not sure if this will help but how about escaping the forward slashes; ^\d{2}\/\d{2}\/\d{4} \d{2}:\d{2}$ you may have to escape the backslashes as well (you have to do this when constructing a RE in C: ^\\d{2}\\/\\d{2}\\/\\d{4} \\d{2}:\\d{2}$ don't know about javascript... just a thought. Dean

Re: Date Time field validation

2004-05-17 Thread Ivan
st" <[EMAIL PROTECTED]> Sent: Monday, May 17, 2004 2:52 PM Subject: Re: Date Time field validation > I'm not sure if this will help but how about escaping the forward > slashes; > > ^\d{2}\/\d{2}\/\d{4} \d{2}:\d{2}$ > > you may have to escape the backslashes as