Final answer:
The principle of legality is the element of a valid contract that disallows any illegal activities or outcomes as part of the contract's terms. It is foundational for ensuring that contracts are enforceable under the law and supports a stable environment for economic transactions.
Step-by-step explanation:
The element of a valid contract that states the contract cannot require any illegal activities or outcomes is the principle of legality. This principle ensures that all terms and conditions within a contract adhere to the law and public policy. It is enshrined in the Constitution, specifically preventing states from passing laws that could impair the obligation of contracts or creating any laws that would apply retroactively, known as ex post facto laws.
Legality is essential for the enforcement and practice of contract law. Without legality as a fundamental component of contracts, individuals and businesses would face uncertain and potentially harmful legal environments where the basic enforcement of agreements could not be reliably secured. This would greatly inhibit economic activity and growth because parties would be reluctant to engage in transactions without the assurance that their contracts will be respected and upheld by the law.