php input time validation code example Example: php input time validation preg_match("/^(?:2[0-4]|[01][1-9]|10):([0-5][0-9])$/", $foo)