It is well settled that if a contract is in several parts, some of which are legal and enforceable and some are unenforceable, lawful parts can be enforced provided they are substantially severable and not merely textually divisible [Shin Satellite, (2006) 2 SCC 628]. The Court must consider the question whether the parties could have agreed on the valid terms of the agreement had they known that the other terms were invalid or unlawful. If the answer to the said question is in the affirmative, the Doctrine of Severability would apply and the valid terms of the agreement could be enforced, ignoring invalid terms.
See, Elektron Lighting, [Civil Appeal No. 9151 of 2015] decided on 20.11.2015.