In general, a contract which violates statute law, or any principle of the common law or of public policy, cannot be enforced. This may be of importance to architects in connection with restrictive building laws. The mere fact that a contract may be, or has been, carried out in such a way as to involve forbidden acts, does not render it invalid; the rule is aimed at such contracts as necessarily involve the doing of something illegal. Similarly a contract which involves a civil wrong to a third person, as if A employs B to build a house in part wrongfully standing beyond A's boundary upon another's land, is illegal. An illegal contract cannot be enforced, according to the general rule, even by one who performed his part of the bargain, although for services rendered under such a contract there might be some right of recovery by implied contract. This is one of the subjects of which it is impossible to give here more than the broadest principles; the point to be borne in mind is that in case of any contract involving legal wrongdoing, there is occasion for caution and for ascertaining legal rights under the peculiar circumstances of the case as it arises.

As contracts which involve violation of statute or common law cannot be enforced, so there are principles of public policy which no contract will be allowed to contravene. Thus clauses such as are common in building contracts, providing that any future disputes arising in the course of dealing between the parties shall be determined in some specified way by arbitration are not always effective to prevent the parties from resorting to law. The policy of the law will not permit courts of justice to be thus ousted of their jurisdiction.

But in spite of the lack of binding force in agreements intended to prevent a resort to the courts, there is a method in which a resort to referees or arbitrators for certain purposes may be enforced. A clause of a contract making it a condition precedent to recovery in court, that the quality of materials, the value of services, the amount of damage, the time of paying it, or other matters not going to the root of the action itself, shall be settled in a certain way, is valid, and will prevent the maintenance of an action until all possible steps have been taken to comply with it. Thus the provision of many building contracts that certain matters such as those named just above shall be referred to the architect, is valid. The further stipulation that the architect's decision of such matters shall be finally binding, is also generally held effective, in the absence of bad faith on the part of the architect. When a contract is thus drawn, the agreement of the parties rests their legal rights directly upon the decision of the persons named. No obligation under the contract therefor arises until the arbitrators decide a question, and they having decided it, resort may be had to the courts in order to enforce their decision. The courts are therefore not ousted of their jurisdiction.