Validating times

mike55

Well-known member
Joined
Mar 26, 2004
Messages
726
Location
Ireland
I am using a regular expression validator to try and validate that the user submits a valid time i.e. nothing over 59 minutes is allowed.

I am using the following expression:
(\b[0-9]{0,2}\b)?((\.\b[0-5]{0,1}[0-9]{0,1}\b)?)

However, the expression is failing to catch numbers over .59

Any suggestions?

Mike55.
 
Solved the problem by trying this: ((\b[0-9]{0,2}\b)?)((\.\b[0-5]{0,1}[0-9]{0,1}\b)?)

Mike55.
 
Back
Top