Javascript
This regex is close to validating 24 Military time "HHMM"hour time but not all the way there.
/^(([01]?[0-9]|[2][0-3])([0-5][0-9]))?$/It fails on 230 and 259
Any help please?
// Return true if only HHMM 24 hour time
function FindIllegalTime(itm, saying) {
if (!/^(([01]?[0-9]|[2][0-3])([0-5][0-9]))?$/.test(itm.value))
{
alert(saying);
setFormFeildColor(itm);
itm.focus();
return true;
}
return false;
}
Thanks in advance!
WIN2K TS/TST 5.5.2 sp5; OD 5.6.0.1; DD 5.5.2
The Professor-