Dear,
According to your question, the employee can not leave the service before 18 months after joining and for leaving the service he has to serve a notice for two months after completing of 18 months in service but I doubt about its legal validity.