Add validity check for times and submit button.