After searching on web for validating time as "HH:MM:SS" I found this: Regex pattern for HH:MM:SS time string. but when i put it in my php code i get an error:
preg_match("^(?:(?:([01]?\d|2[0-3]):)?([0-5]?\d):)?([0-5]?\d)$", "12:33:51", $matches);
this is my error message
Warning: preg_match(): No ending delimiter '^' found in db-dataitem.php on line 128
How could I change the pattern string so it can work for PHP?