The issue of the right of recovery by a building contractor who has failed to comply literally with specifications of building codes and ordinances has provoked much discussion and has brought forth opinions from courts and text writers, many of which are diametrically opposed. The authorities are generally agreed that a contract, whether it be a building contract or not, which upon execution will, by the thing which it tends to create, breach a positive law, is void and unenforceable. But, as is true of other rules of law which can not and do not have universal application, the courts will grant exceptions if justice will be better served by so doing. In considering the nature of the law which has been positively and expressly codified and its effect invalidating an agreement which, by its provisions, violates the law, the authorities have found that building ordinances as well as statutes should be given practical application and interpreted in the light of the conditions and circumstances under which they are passed and the objects sought to be attained.
Walter Rubenstein & John D. Murray, Failure to Conform to the Building Code; Its Effect on the Contracting Parties, 2 Clev.-Marshall L. Rev. 144 (1953)