Contract Law and Legal Purpose Explained
A contract must have a legal purpose to be valid. Learn how courts assess legality, void illegal contracts, and why legal purpose matters in contract law. 6 min read updated on August 05, 2025
Key Takeaways
- A contract must have a legal purpose to be valid and enforceable under the law.
- Contracts formed for illegal acts—such as fraud, gambling (in some jurisdictions), or unlicensed business—are void or voidable.
- A contract’s legality is judged by its subject matter and compliance with applicable laws and public policy.
- Courts do not enforce agreements that violate statutory law or promote harm to society.
- Both civil and criminal consequences may apply when contracts lack legal purpose.
Contract law is a field of study within the legal profession that is involved with regulation, establishment and legislation as it pertains to contracts. Within that scope, a contract is a document that is legally binding, provided that the activities spelled out therein are lawful. Learn more about different types of contracts.
Most contracts are entered into by a minimum of two people (or parties) and contain four points, the most significant being:
- One party is making an offer that the other party accepts. This can also be called a meeting of the minds or a concurrence of wills.
What Are the Key Requirements to a Contract?
Legally, a contract can contain almost anything, provided that all of it is legal. However, to ensure the validity of a contract, there are certain key points that must be included to ensure that it is not later deemed null and void. Among them, are:
- Mutual assent, which is essentially the valid offer and acceptance.
- Capacity to Contract, which is the verification that all parties are of sound mind and body (and of legal age), and are therefore mentally and emotionally able to enter into a legal contract.
- Consideration, which exists to ensure that a contract is in some way, beneficial to all parties involved.
- Lawfulness of purpose, which ensures that any and all activities as spelled out in the contract are legal.
- Legality of form.
- Intention to create legal relations, meaning that all parties are in agreement as to the terms of the contract and the legality thereof.
- Consent to contract, meaning that all parties are entering into the contract willingly and without being coerced. Additionally, it means that all parties were clear-headed and not under the influence of drugs, alcohol or other mind-altering substances.
Understanding Legal Purpose in Contract Law
A core requirement of any valid contract is that it must be formed for a legal purpose. This means the agreement must not involve actions that are illegal or contrary to public policy. If a contract’s subject matter is criminal, fraudulent, or otherwise unlawful, the entire agreement may be rendered void and unenforceable.
Definition of Legal Purpose:In contract law, “legal purpose” refers to the requirement that the content and goals of a contract must be lawful. The contract must not involve:
- Activities that are criminal or civil violations (e.g., drug trafficking, prostitution, theft).
- Acts that defraud others (such as fake investment schemes).
- Breaches of regulatory or licensing requirements.
- Objectives that undermine public morality or safety.
Why Legal Purpose Matters:The legal purpose of a contract safeguards public interest and prevents courts from being used to support illegal or unethical behavior. If a contract lacks legal purpose, courts will typically:
- Decline to enforce it.
- Declare it void or void ab initio (from the beginning).
- Refuse to award damages or restitution to either party.
Illegal Contracts
Perhaps you have questions as to the legality of a contract that you have signed. Within the scope of contract law, a contract may be deemed illegal for a few different reasons:
- A minor (someone under 18) has entered into the contract
- One of the parties entered into the contract under threat, blackmail or another form of coercion
- There are illegal activities cited in the contract, such as homicide, drug dealing, or (in some jurisdictions) gambling
- One of the parties was under the influence of drugs or alcohol, and therefore unable to legally consent
- One of the parties is not, for whatever reason, considered medically capable of entering into a legal contract, due to mental or emotional reasons
To ensure that any contract you are becoming engaged in is fully on the up-and-up, it can be beneficial to consult with an attorney prior to signing.
Examples of Contracts That Lack Legal Purpose
Courts routinely strike down contracts that violate statutory or common law due to an unlawful objective. Common examples include:
- Contracts for Illegal Acts: Agreements to smuggle goods, sell controlled substances, or engage in bribery are void.
- Unlicensed Agreements: Contracts involving professionals who are required to be licensed—like doctors, contractors, or attorneys—but are not, may be unenforceable.
- Non-Compete Clauses in Restricted Jurisdictions: In states like California, non-compete clauses are often considered void unless very narrowly tailored.
- Contracts Contrary to Public Policy: Agreements that promote discrimination, restrain trade unfairly, or enable gambling in jurisdictions where it is banned may lack legal purpose.
Contract vs. Agreement
As there are some similarities between a contract and an agreement, the terms are sometimes used interchangeably, however, this is not necessarily accurate. In fact, contract law definitions make it quite clear that the two are not actually one in the same. Some of the key differences include:
- An agreement is not legally binding as a contract is. Therefore, should one of the parties involved in the agreement not honor their end of the deal, the other party does not really have any legal recourse.
- Legal action can be taken in the case of a breach of contract, which results from one of the parties involved in the contract not meeting their obligations.
Validity and Enforcement Based on Legal Purpose
Not every agreement is legally binding, and one key factor that determines validity is whether the agreement has a legal purpose. A court will typically ask:
- Does the contract promote illegal conduct or conflict with public welfare?
- Are both parties aware of the illegal nature of the agreement?
- Was one party less at fault (e.g., coerced or unaware of the illegality)?
In some cases, only part of the contract is illegal. If the illegal portion can be severed without undermining the main purpose of the contract, a court might enforce the rest of it.
The Formalities of a Contract
Generally speaking, we often think of contracts as being written documents, however, legally they can be entered into verbally, as well. With that said, it is far easier to enforce a contract, should it be necessary, if it is a written document. The reasons being fairly obvious: it is easier to prove that all parties were in agreement as to the terms of the contract when it is there in black and white, and signed by everyone involved.
However, the verbal contract is still considered just as valid and legally binding as a written contract; these types of contracts are also referred to as, “a contract implied by the acts of the parties”. For example, if you hire a website designer to create a website for you and they begin doing work on it (submitting you design ideas and copy language), then their actions imply that a contract has been entered into.
Legal Remedies and Consequences of Illegality
When a contract is deemed void due to an illegal purpose, the following consequences may apply:
- No Legal Enforcement: Courts generally refuse to assist either party in enforcing the contract.
- No Damages or Restitution: Parties are left in the position they were in prior to the agreement—in pari delicto (“equally at fault”) often applies.
- Potential Criminal Liability: If the contract’s performance involved criminal acts, both parties may be subject to prosecution.
- Civil Penalties: Regulatory violations could lead to fines or loss of licenses for individuals or businesses.
It’s important to note that exceptions may exist if one party was unaware of the contract’s illegality or was pressured into the agreement.
Frequently Asked Questions
-
What does it mean for a contract to have a legal purpose?
A contract has a legal purpose when its objective is lawful and does not violate statutes or public policy. -
What happens if a contract has an illegal purpose?
It is typically declared void and unenforceable by courts. Neither party can seek damages or enforcement. -
Can part of a contract be illegal but still valid?
Yes, if the illegal part can be severed without affecting the core purpose of the contract, the remainder may still be enforceable. -
Are oral contracts with illegal purposes valid?
No. Regardless of whether a contract is written or oral, it must have a legal purpose to be valid. -
How can I ensure my contract has a legal purpose?
Consult a licensed attorney to review the subject matter and terms of your agreement to confirm compliance with applicable laws.
If you need help with contract law, you can post your legal need on UpCounsel’s marketplace. UpCounsel accepts only the top 5 percent of lawyers to its site. Lawyers on UpCounsel come from law schools such as Harvard Law and Yale Law, and average 14 years of legal experience, including work with or on behalf of companies like Google, Menlo Ventures, and Airbnb.