commit to validate if user enters valid date