Geeks With Blogs
Gaurav Taneja Great dreams... never even get out of the box. It takes an uncommon amount of guts to put your dreams on the line, to hold them up and say, "How good or how bad am I?" That's where courage comes in.
case "Time":
               var re=/^(([1-9]{1})|([0-1][1-2])|(0[1-9])|([1][0-2])):([0-5][0-9])\s{1}(([aA])|([pP]))[mM]$/;
               var charpos =;
               if(objValue.value.length >= 0 &&  charpos < 0)
                 if(!strError || strError.length ==0)
                    strError =;
               //alert(strError + "\n [Error character position " + eval(charpos+1)+"]");
               objErrorLbl.innerHTML = strError;
            return false;

Add this Case in the article published before for the Javascript Posted on Thursday, March 13, 2008 11:49 PM Validation | Back to top

Comments on this post: Time Validation HH:MM AM/PM format

No comments posted yet.
Your comment:
 (will show your gravatar)

Copyright © Gaurav Taneja | Powered by: