Returns true
for me. Try this regex instead:
function validateDate($date) {
echo $date;
if( !preg_match("/^(\d{4})-(\d{2})-(\d{2}) (\d{2}):(\d{2}):(\d{2})$/",$date,$m)) return false;
if( !checkdate($m[1],$m[2],$m[0])) return false;
if( $m[3] > 23) return false;
if( $m[4] > 59) return false;
if( $m[5] > 59) return false;
return true;
}
It is easier to validate format in RegEx, followed by validating content with targeted functions, than to try and do everything in RegEx.