This should work better, and be more simply written:
function validateDate($date)
{
return preg_match('/^([0-9]{4})-([0-9]{2})-([0-9]{2}) ([1-2]{1})([0-9]{1}):([0-5]{1})([0-9]{1}):([0-5]{1})([0-9]{1})$/', $date);
}
However it will return true with 9999-99-99 29:59:59 as others mentioned...
From PHP manual, you can easily find more elegant and reliable solutions, for example (inspired from this comment):
function validateDate($data)
{
return (date('Y-m-d H:i:s', strtotime($data)) == $data);
}