validate the date as an date