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 = objValue.value.search(re);
if(objValue.value.length >= 0 && charpos < 0)
{
//alert(charpos);
if(!strError || strError.length ==0)
{
strError = objValue.name;
}//if
//alert(strError + "\n [Error character position " + eval(charpos+1)+"]");
objErrorLbl.innerHTML = strError;
return false;
}//if
break;
}
Add this Case in the article published before for the Javascript
No comments:
Post a Comment