added validation to edit time/purchase