Search the web
Sign In
New User? Sign Up
validation · Techniques for HTML form validation
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Message search is now enhanced, find messages faster. Take it for a spin.

Best of Y! Groups

   Check them out and nominate your group.
Having problems with message search? Fill out this form to ensure your group is one of the first to be migrated to the new message search system.

Messages

  Messages Help
Advanced
Time Validation (24 hour format) using Regular Expression   Message List  
Reply | Forward Message #296 of 427 |
Hello everybody,

I am trying to build a regular expression to validate time data in 24-
hour format (without AM/PM).

It should be able to validate time strings like - 08:59, 00:30, 23:00
etc. But should invalidate 24:00, 25:87 etc...

Can anybody please help me.

Regards,
Kaushik.




Mon Sep 8, 2003 2:12 pm

kaushik_pawar
Offline Offline
Send Email Send Email

Forward
Message #296 of 427 |
Expand Messages Author Sort by Date

Hello everybody, I am trying to build a regular expression to validate time data in 24- hour format (without AM/PM). It should be able to validate time strings...
Kaushik Pawar
kaushik_pawar
Offline Send Email
Sep 8, 2003
2:12 pm

the toDate function in the 3.0.1 validation script can be used to "cast" a value to a datetime. it returns undefined if the conversion fails. if(typeof...
Matthew Frank
somematt
Offline Send Email
Sep 8, 2003
6:03 pm
Advanced

Copyright © 2009 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines - Help