add validation to date