Validation added for dates