If your server is a) not Windows, and b) competent enough to be hosting PHP5 >= 5.1.0, it could be as simple as:
function validateDate($input_date, $format){
return (bool)strptime($input_date, $format);
}
Note that the format requires % characters as per the format understood by the [man]strftime/man function.