For a contract to be valid, it must meet certain criteria. There must be a meeting of the minds[?] between the parties, meaning that they must have all generally understood what was being agreed. There must be consideration given by all the parties, meaning that every party is exchanging something of value as part of the transaction.
Contrary to common wisdom, a contract is not invalid if it is verbal or if it is unsigned. Courts[?] in the United States have generally ruled that if the parties have a meeting of the minds and act as though there was a formal, written and signed contract then a contract exists. Most jurisdictions require a signed writing for certain kinds of contracts; such requirements are referred to as the statute of frauds.
Further, the existence of a written contract does not necessarily prove its enforcability or validity. A contract can be deemed unenforceable if it requires a party to undertake an illegal act, if it was signed under duress or while intoxicated, if the disparity in knowledge between the parties is extreme and the weaker party was given onerous terms, etc.
In the United States the validity of contracts is protected directly in the Constitution. The rules by which contracts are judged are codified by each state in a commercial code[?], most of which are based on the Uniform Commercial Code (UCC).