changed date validation to use standard php function checkdate