Added validateTime for edit