It is completely illegal as per contract act section 27. Supreme court has held many times that such a condition is illegal.
I am quoting some judgements in this regard. Even if an employee signs such a bond (I will not join a competitior within 2 years or something like it) it is not valid)
Gujarat – Lalbhai Dalpatbhai & Co Vs Chittaranjan Chandulal Pandya, AIR 1996 Guj Restriction on employee after termination of employment is not valid. Employee does not have any bargaining power and has to sign on dotted line.
“9....If it is not going to benefit ”the employer in any legitimate manner, the court would not injunct the employee from exercising his skill, training and knowledge merely because the employee has agreed to it”
Gujarat – Sandhya Organic Chemicals P Ltd Vs United Phosphorous Ltd, AIR 1997 Guj 177. as per contract act, service covenant beyond service period is not valid.
“16....The supreme court has also ruled that under section 27 of the contract act, a service covenant beyond the termination of the service is void”
Supreme court – Superintendence Company of India Vs Krishnan Murgai, AIR 1980 SC 1717. Post service conditions are not valid. Even partial condition is not valid. Inequality of bargaining power with employees and harsh and oppressive conditions make the contract invalid.
“29.A contract, which has for its object a restraint of trade, is prima facie void....whether the restraint was general or partial, unqualified or qualified, if it was in the nature of a restraint of trade, it was void.
32.....If the agreement puts a restraint even though partial, it was void and therefore, the contract must be treated as one which can not be enforced.
53....Not a Indian Decision has been brought to our notice where an injunction has been granted against an employee after the termination of his employment.
58....If the covenant is to operate after the termination of services, or it is too widely worded, the court may refuse to enforce it.
59....there is inequality of bargaining power between the parties, indeed no bargaining may occur because the employee is presented with a standard form of contract to accept or reject... ”
Supreme court – Moti Ram Deka Vs East Frontier Railways, AIR 1964 SC 600. If a contract is not valid as per contract act, the fact that it was signed by the employee is of no avail as decided by 7 judge constitutional bench.
“31....it is well known that if the contract is void, as for instance, under section 23 of the Indian contract act, the plea that it was executed by the party would be to no avail....”
Supreme court – Niranjan Shankar Golikari Vs Century Spinning, AIR 1967 SC 1098, negative covenant in a service agreement is void. Negative covenant after termination of contract is not valid.
Supreme court – Percept D Mark (India) Ltd Vs Zaheer Khan, AIR 2006 SC 3426, any condition after termination of contract will be invalid.
“55. On the pleading contained in the arbitration petition, there can be no escape from the conclusion that what the appellant sought to enforce was a negative covenant which, according to the appellant, survived the expiry of the agreement. This, the High Court has rightly held is impermissible as such clause which is sought to be enforced after the term of the contract is prima facie void under section 27 of the contract Act”
Supreme Court of India : Bank Of India & Ors vs O.P. Swarnakar Etc on 17 December, 2002, Bench: H Sema, S Sinha on the topic of VRS
..... It is difficult to accept the contention raised in the Bar that a contract of employment would not be governed by the Indian Contract Act. A contract of employment is also a subject matter of contract. Unless governed by a statute or statutory rules, the provisions of the Indian Contract Act would be only applicable at the formulation of the contract as also the determination thereof.