For a valid contract it is essential that the object or consideration of the agreement must be lawful. According to Sec. 23 of the Indian Contract Act, the objects and the consideration of an agreement shall be unlawful in the following cases: 1. Where it is forbidden by law: As a matter of fact, an act is forbidden by law, when it is punishable by criminal law of the country, or when it is prohibited by special legislation or by the regulations made by a competent authority under power derived from the legislature. 2. Where it defeats the provision of any law: It is of such nature that, if permitted, it would defeat the provisions of law, e.g., purchase of land being sold for arrears of land revenue by the defaulter, or an agreement by a debtor not to raise the plea of limitation in a suit by the creditor. 3. Where it is fraudulent: If the two parties agree to practice a fraud on third party, then the agreement between the parties is unlawful and void. 4. Where it is injurious either to the person or his property: It involves or implies injury to the person or property of another, e.g., an agreement to indemnify a person against the consequences of publication of a libel. 5. Where it is regarded as immoral: The term ‘immoral’ depends upon the standard of ‘morality’ prevailing at a particular place and time. If the consideration for the agreement is an act of sexual immorality, for example, illicit co-habitation and prostitution, the agreement is illegal. 6. Where it is opposed to public policy: The agreements that are injurious to the public or which are against the public good or public welfare are void.
For Mutual Mistakes of Fact, The Usual Remedy Is That The Courts Declare The Contract Void. The Parties Are Not Bound To Its Terms and Neither Party Has To Perform The Duties Listed in The Agreement