Adding validation to the start and end time