Good evening,
I single line of text field that I'm using for users to enter in a time. I'm validating the field using this regular expression: ^([0-9]|0[0-9]|1[0-9]|2[0-3]):[0-5][0-9]$
It works fine for putting in a time of, for example, 1:30 however I am wondering if there is a way to allow the user (or better yet force the user) to add AM or PM after the time.
All help is appreciated.
Andrew
Solved! Go to Solution.
sure, something like this shouldw work
^([0-9]|0[0-9]|1[0-9]|2[0-3]):[0-5][0-9]\s(AM|PM)$
Thanks @emha. It works perfectly.