
766 So.2d 161 (1998)
THOMAS LEARNING CENTER, INC., et al.
v.
Don McGUIRK d/b/a McGuirk Construction Company, et al.
2970471.
Court of Civil Appeals of Alabama.
December 11, 1998.
Rehearing Denied February 5, 1999.
Certiorari Quashed March 31, 2000.
*163 Donna Shirley and Douglas Corretti of Corretti, Newsom & Hawkins, Birmingham, for appellants.
Joe L. Leak of Starnes & Atchison, L.L.P., Birmingham, for appellee Don Martin Construction Co., Inc.
Alabama Supreme Court 1980842.
CRAWLEY, Judge.
Robert F. Thomas and his wife Joyce E. Thomas and Thomas Learning Center, Inc. ("TLC"), a corporation controlled by the Thomases, sued Don McGuirk, d/b/a McGuirk Construction Company, and Don Martin Construction Company, Inc. ("Martin"), alleging breach of contract and negligence. McGuirk answered, denying that he had breached a contract with TLC or that he had been negligent. He also filed a counterclaim alleging breach of contract by TLC and an entitlement to compensation for work and labor done. Martin answered, denying that it had a contract with TLC or that it had been negligent, but asserting, in the alternative, that TLC had been contributorily negligent.
The case was tried to a jury, which returned a verdict for McGuirk and Martin on TLC's claims, and for TLC on McGuirk's counterclaims. The trial court entered judgments on the verdict and TLC appealed to the supreme court. The supreme court transferred the case to this court, pursuant to § 12-2-7(6), Ala.Code 1975.
Mr. and Mrs. Thomas own and operate TLC, a day-care center in Alabaster. The Thomases contracted with McGuirk to design and build an addition to the day-care center, for $20,000. On May 10, 1996, the *164 parties signed a written contract that provided the following:
"[McGuirk] agrees to meet all code requirements. Two classrooms are to be built, each having no less than 256 square feet of floor space, exclusive of bathrooms. The 18-month-old room is to have a diaper changing table and hand washing sink. Storage cabinets are to be provided below the sink and changing table.
"Three toilets and three hand wash sinks are to be included. Each classroom is to have two double-insulated windows and 8 feet of shelf space. The shelf space is to be 5 feet above floor level."
McGuirk told the Thomases that he was a licensed general contractor and that he had his own architect who would design the addition and who would be paid $390 from the $20,000 total fee for the project. The contract further provided:
"This construction job consists of a separate contract for drawing services. Drawing services are contracted for with BAF Drafting, a separate business owned by Bennie Freed. The drafting fee for this 600 square foot addition amounts to $390 and has been deducted from the quoted $20,000 price to arrive at a contract price for the construction of $19,610."
The Thomases paid McGuirk $9,600 when the contract was signed.
The contract did not provide a date by which McGuirk was to complete the project. The Thomases testified at trial, however, that they told McGuirk they wanted the addition finished by the end of May and that McGuirk assured them that the job would be done by then. Within a few days of signing the contract, McGuirk removed some fencing around the building, tore out an existing concrete porch pad, and had various construction materials delivered to the site. For three weeks thereafter, McGuirk did no further work on the addition. When the Thomases asked McGuirk why the job was not progressing, McGuirk stated that he was having problems obtaining a building permit from the City of Alabaster.
On May 28, 1996, Mrs. Thomas received a telephone call from Mike Kent, the city building official. Kent told Mrs. Thomas that McGuirk was unable to get a building permit because he was not a licensed contractor, but that another person, Don Martin, had "applied for a permit for Mr. McGuirk." Mrs. Thomas questioned Kent about the propriety of another person's getting the permit for McGuirk and she said Kent "assured [her] that it was legal for Mr. Martin to get the building permit."
Mike Kent testified that a general contractor's license is required for a commercial building project worth $20,000 or more.[1] Kent said, however, that McGuirk was not required to have a general contractor's license in order to obtain a building permit for the TLC construction project because the amount of the TLC contract was $19,610; therefore, the cost was below the $20,000 statutory threshold. According to Kent, McGuirk was required to have a city business license in order to obtain a building permit.[2] Kent stated that McGuirk's application for a building permit was denied because he did not have a city business license, not because he did not have a State general contractor's license. Kent explained that although Martinlike McGuirkwas not a licensed general contractor, *165 he did have a city business license and that that is how he was able to obtain the building permit for McGuirk. Kent testified that he had known Martin for 8 to 10 years, that he and Martin were business partners in a real estate development known as Kentwood, and that his office had performed the building inspections for the residential construction in Kentwood.
At trial, McGuirk admitted that he had neither a general contractor's license nor a city business license. He said that he thought his application for a building permit was rejected because he was not a licensed general contractor. He stated that he was told by someone in the city building official's office that "it was [a] twenty thousand dollar [contract] and [he] had to be a general contractor" in order to obtain a building permit.
Don Martin acknowledged that he, too, was not a licensed general contractor. He testified that he had agreed to obtain a building permit for McGuirk, even though he did not know McGuirk or the Thomases, because his wife, who was acquainted with McGuirk's wife, asked him to help McGuirk. In applying for the permit, Martin signed the following statement:
"I certify that I have read this document and state that the information is correct. I agree to comply with all local ordinances and state laws relating to building construction, and hereby authorize representatives of the City of Alabaster to enter upon the above-mentioned property for inspection purposes."
The building permit states, in pertinent part, the following:
"This permit is issued subject to compliance with all requirements of the building code and all pertinent laws and ordinances of the City of Alabaster regulating the use and construction of structures and the work authorized by this permit. Otherwise it shall be void and the party liable to such penalties as may be provided for violation of said ordinances."
The building permit was issued on May 28, 1996, and McGuirk began construction. Two months later, McGuirk was still not finished with the project and the Thomases were becoming impatient with McGuirk's tardiness in completing the job. During the month of June, they made two more payments, of $2,000 and $3,000, to McGuirk. On July 26, 1996, the Thomases turned to Don Martin and demanded that Martin finish the construction on behalf of McGuirk. They sent Martin a "punch list" containing numerous items that, they claimed, were either defective or incomplete. Martin forwarded the "punch list" to McGuirk, informed the Thomases that he did not have a contract with them, and told them that they should look to McGuirk to complete the job. The Thomases then sent McGuirk a letter demanding that he finish the addition by August 2 at 4:00 p.m., or leave the job and they would hire another contractor to complete the project.
It is undisputed that McGuirk remedied some, but not all, of the items on the "punch list" and left the job on August 3. At that time, the Thomases paid him $2,000. The Thomases then engaged other workmen to complete what they considered remained to be done on the addition.
At trial, the Thomases presented the testimony of G. Alvon Dampier, an architect the court recognized as an expert witness. Dampier testified that the plans and specifications for the TLC addition were deficient. He pointed out examples of numerous city, state, and federal building-code violations in the work. He gave his opinion that the materials were defective and that McGuirk's workmanship was inferior. McGuirk conceded that there were building-code violations in the project, but he claimed that change orders requested by the Thomases made building-code compliance impossible. He also presented evidence that the addition had passed the final inspection by Mike Kent, the city building inspector; had been approved by the fire marshal; and had been accepted by the Department of Human Resources, the agency that oversees the operation of day-care centers in Alabama.


*166 I.
The Thomases contend that the trial court erred by charging the jury on contributory negligence. They argue that Martin breached both a contractual duty and a duty of due care to them. They maintain that the contributory negligence charge was error, first, because contributory negligence is not a defense to a contract claim and, second, because under the particular facts of this case contributory negligence was not a defense to their particular negligence claims.

A. The Contract Claim Against Martin

At trial, Mike Kent and June Webb, a clerk in the Alabaster Building Inspection Services Department, testified that by obtaining the building permit for McGuirk, Martin assumed a duty to the City of Alabaster: to see that the work met code requirements and was performed in a good and workmanlike manner. The Thomases argue that Martin had a contractual duty to them as third-party beneficiaries of Martin's agreement with the city. That argument does not appear to have been raised before in Alabama cases, but other courts that have considered it have rejected it on one of two grounds, namely: (1) that there was no contract between the municipality and the permittee, see Trevino & Gonzalez Co. v. R.F. Muller Co., 949 S.W.2d 39 (Tex.App.1997), or (2) that, if there was a contract, the owner was only an incidental, and not an intended, beneficiary, see Ihrig v. New York Atlantic-Inland, Inc., 176 A.D.2d 1160, 575 N.Y.S.2d 967 (1991). In Trevino, the Texas Court of Appeals held:
"[W]hen a building permit is issued, none of the elements of a contract are present. There is no offer, no acceptance, and no consideration. A building permit is simply a revocable and alterable license authorizing construction. Its purpose is to ensure that appropriate buildings are constructed in a manner and means approved by the municipality. The application for an issuance of a building permit does not constitute a voluntary agreement between the parties to enter into a binding contract.
"Because the construction permit in question does not operate as a contract between the [municipality] and the [permittee], [the owner] has alleged no viable cause of action.... Where there is no contract, there can be no breach of contract and, likewise, there can be no third party beneficiary."
949 S.W.2d at 42. We believe the reasoning of the Texas court is sound and, applying that reasoning to the facts of this case, we hold that the issuance of the building permit did not constitute a contract between Martin and the city. Moreover, we conclude that even if there had been a contract, the Thomases did not prove that they were the intended beneficiaries of the contract.
Under Alabama law, a party claiming to be a third-party beneficiary must establish that the contracting parties intended to bestow a direct, as opposed to an incidental, benefit upon the third party. Weathers Auto Glass, Inc. v. Alfa Mut. Ins. Co., 619 So.2d 1328, 1329 (Ala.1993); Ross v. Imperial Constr. Co., 572 F.2d 518, 520 (5th Cir.1978). There was no evidence that Martin and the City of Alabaster intended to bestow a direct benefit upon the Thomases by having Martin procure a building permit for McGuirk. Indeed, Martin testified, without contradiction, that he had intended to aid McGuirk, that he had informed the Thomases that he had no duty to them, and that he had told them they should look to McGuirk for performance.
We hold that Martin had no contractual duty to the Thomases, because he did not enter into an agreement with them or intend that they directly benefit from any agreement he may have had with the city. In light of that holding, the Thomases' argument that contributory negligence is no defense to a contract claim is irrelevant.

B. The Negligence Claims Against Martin

At trial, the Thomases argued that Martin was negligent (1) by obtaining a building *167 permit for McGuirk when he knew that McGuirk did not have a general contractor's license, and (2) by failing to complete the project in a good and workmanlike manner when requested. Martin contended that the Thomases were contributorily negligent because they also knew McGuirk was unlicensed, yet allowed McGuirk to proceed with construction. Of the two defendants, only Martin asserted the affirmative defense of contributory negligence. The trial court, however, did not give a limiting instruction informing the jury that it could consider contributory negligence only in relation to the negligence claim against Martin. On the issue of contributory negligence, the court charged the jury:
"Contributory negligence is negligence on the part of the plaintiffs that proximately contributed to their alleged injury or property damage. If you are reasonably satisfied from the evidence that the plaintiffs were guilty of contributory negligence, the plaintiffs cannot recover for any initial simple negligence of the defendants."
(Emphasis added.)

(1) Negligence Based on Violation of a Licensing Statute

In order to determine whether Martin was negligent by obtaining a building permit for McGuirk despite the fact that Martin knew McGuirk was an unlicensed general contractor, we must decide whether McGuirk was subject to the requirements of § 34-8-1 et seq.[3]
A builder must be a licensed general contractor in order to engage in a construction project "where the cost of the undertaking is twenty thousand dollars ($20,000) or more." Ala.Code 1975, § 34-8-1.[4] Section 34-8-9, Ala.Code 1975, provides that no official shall issue a permit for the construction of any building project "where the cost thereof is $20,000 or more" without satisfactory proof that the applicant is a licensed general contractor. Section 34-8-1, Ala.Code 1975, defines a "general contractor" as
"one who, for a fixed price, commission, fee or wage, undertakes to construct or superintend or engage in the construction... of any building ... or any improvement in the State of Alabama where the cost of the undertaking is twenty thousand dollars ($20,000) or more...."
Section 34-8-2 requires any person desiring to do business as a general contractor to obtain a license from the Alabama State Contractors Licensing Board. That section outlines the following requirements for obtaining a license: the applicant must submit a financial statement prepared by *168 an accountant, must document his previous experience, and must describe his equipment. In addition, the applicant may be required to take an examination to determine his qualifications. Section 34-8-3 states that the Alabama State Contractors Licensing Board may administer an oral or written examination "to ascertain the ability of the applicant to make a practical application of his knowledge of the profession of general contracting." That section further provides:
"[T]he board shall investigate thoroughly the financial responsibility and past record of all applicants, which will include an effort towards ascertaining the qualifications of an applicant in reading plans and specifications, estimating costs, construction ethics and other similar matters. The board shall take all applicants under consideration after having examined them and go thoroughly into the records, oral and written examinations prior to granting any certificate of license."
Section 34-8-6 prohibits any unauthorized person, firm, or corporation from engaging in the business of general contracting and provides misdemeanor penalties for violations.
In order to determine whether McGuirk was subject to the provisions of the general-contractor licensing statutes, we must determine whether "the cost of [McGuirk's] undertaking" was $20,000 or only $19,610. In construing the phrase "cost of the undertaking," the Alabama Supreme Court has not been persuaded by attempts to circumvent the requirements of the general-contractor licensing statutes, and it has analyzed all the circumstances surrounding a construction contract to determine whether the agreement meets the $20,000 statutory threshold.
For example, in Cochran v. Ozark Country Club, Inc., 339 So.2d 1023 (Ala.1976), the court rejected an unlicensed contractor's argument that his undertaking did not fall within the prohibition of the statute because he had negotiated two separate $18,000 contracts on one $36,000 building project for the same owner. In Cochran, the court held that "the word `cost' in [§ 34-8-1] refers to the aggregate amount which the contractor is to receive for his work." 339 So.2d at 1024.
Similarly, in Hawkins v. League, 398 So.2d 232 (Ala.1981), the court found no merit to an unlicensed contractor's argument that a "$10,000-fixed-fee-plus-costs" agreement was below the $20,000 threshold when the contractor received $17,724.75 in "costs" over and above the fixed fee. In J & M Industries, Inc. v. Huguley Oil Co., 546 So.2d 367 (Ala.1989), the court held that a contractor whose final invoice to the owner was only $14,513 was, nevertheless, subject to the licensing provisions of § 34-8-1 et seq., because the evidence established that the contractor "was entitled to [more than $20,000] for materials, work, and labor done in connection with the construction." 546 So.2d at 369.
The Alabama Supreme Court has not been presented with a case in which it has had to decide whether the "cost of the undertaking" includes only the sum that the contractor is to receive for his work, or whether it also includes amounts that others over whom the contractor exercises some degree of control are due to receive for their work. Courts in other jurisdictions have held that if the contractor retains control over subcontractors or over purchases passing through his accounts, then the owner's payments for those expenditures add to the "cost of the undertaking" and, if the payments meet the statutory threshold, they make the contractor subject to the general-contractor licensing requirements. See, e.g., Spears v. Walker, 75 N.C.App. 169, 330 S.E.2d 38 (1985); Fulton v. Rice, 12 N.C.App. 669, 184 S.E.2d 421 (1971).
In Spears, the North Carolina Court of Appeals, construing a statute virtually *169 identical[5] to § 34-8-1, held:
"In interpreting [the general-contractor licensing statutes] and ascertaining the extent to which an undertaking and its cost should be attributed to a particular contractor, the courts in North Carolina have focused on the control exercised by the contractor over the project."
In Fulton, the North Carolina court rejected an owner's argument that additional payments it made to third parties, pursuant to agreements outside the scope of its agreement with the contractor, should be included to bring the "cost of the undertaking" up to the statutory threshold. The court explained that the cost of a contractor's undertaking is limited to those payments that he, or someone over whom he has control, receives.
Applying the foregoing principles of law to the undisputed facts of this case, we think it is clear that the cost of McGuirk's undertaking was $20,000 rather than $19,610. McGuirk told the Thomases that he had "his own architect," Bennie Freed of BAF Drafting, who would design the addition. The record does not disclose the contractual arrangements between McGuirk and Freed, but it is apparent that it was McGuirknot the Thomaseswho engaged Freed's services and negotiated his fee. Despite the fact that Freed's $390 fee was designated as a payment arising out of a "separate contract for drawing services," it is evident that McGuirknot the Thomasesexercised control over the design phase of the contract. McGuirk referred to his agreement with the Thomases as a "design/build" contract. In a "design/build" contract, the contractor is "responsible for the project from design to construction and ... assume[s] the responsibility for providing the necessary [designers]." Nicholson & Loup, Inc. v. Carl E. Woodward, Inc., 596 So.2d 374, 388 (La.App.), writ denied, 605 So.2d 1098 (La. 1992). See also C.L. Maddox, Inc. v. Benham Group, Inc., 88 F.3d 592, 596 n. 2 (8th Cir.1996).
Our supreme court has held that § 34-8-1 is not a law enacted solely for revenue purposes, but is, instead, regulatory legislation designed to protect the public against incompetent contractors and to assure properly built structures that are free from defects and dangers to the public.
"In 1935, the legislature first enacted what is now codified at Code 1975, § 34-8-1 et seq., in order, primarily, `to protect the public against incompetent contractors for certain type structures, which [are] free from defects and dangers to the public.' Cooper v. Johnston, 283 Ala. 565, 567, 219 So.2d 392, 394 (1969). Indeed, the Cooper Court, after studying the original act and the subsequent legislation amending the act, held that the act appearing at § 34-8-1 et seq. was enacted `for regulation and protection as distinguished from a law created solely for revenue purposes.' Cooper, 283 Ala. at 567, 219 So.2d at 394."
J & M Industries, Inc. v. Huguley Oil Co., 546 So.2d at 368.
We conclude that the $390 "drafting fee" for Bennie Freed must be included in the "cost of [McGuirk's] undertaking" so as to bring McGuirk within the requirements of the general-contractor licensing statutes. A contrary holding would encourage unscrupulous contractors to avoid the requirements of the licensing statute by designating payments to subcontractors and suppliers as incident to "separate contracts." Our supreme court has stated:
"The importance of the regulatory nature of the statute, and the protection it affords the citizens of Alabama, cannot be avoided by unlicensed contractors who, through creative schemes, seek to circumvent the requirements of § 34-8-1 et seq."
*170 Med Plus Properties v. Colcock Constr. Group, Inc., 628 So.2d 370, 374 (Ala.1993).
We hold that McGuirk violated § 34-8-1 et seq. by engaging in a construction project for which the cost of the undertaking was $20,000 or more, without having a general contractor's license. That holding necessarily means that Martin also violated the general-contractor licensing statutes by obtaining a building permit for McGuirk. Specifically, Martin violated § 34-8-6 and § 34-8-9. Those statutes provide, in pertinent part, the following:
§ 34-8-6:
"(a) Any person, firm, or corporation not being duly authorized who shall engage in the business of general contracting in this state ... and any person, firm, or corporation presenting or attempting to file as its own the license certificate of another, or who shall give false or forged evidence of any kind to the board, or to any member thereof, in obtaining a certificate of license, or who falsely shall impersonate another, or who shall use an expired or revoked certificate of license, shall be deemed guilty of a Class A misdemeanor and for each offense for which he or she is convicted shall be punished, fined, or both, in accordance with Sections 13A-5-7 and 13A-5-12."
§ 34-8-9:
"Any person, firm, or corporation, upon making application to the building inspector or such other authority of any incorporated city, town, village, or county in Alabama charged with the duty of issuing building or other permits for the construction of any building ... where the cost thereof is twenty thousand dollars ($20,000) or more, shall, before he or she shall be entitled to the issuance of permits, furnish satisfactory proof to the inspector or authority that he or she is duly licensed under this chapter. It shall be unlawful for the building inspector or other authority to issue or allow the issuance of the building permit unless and until the applicant has furnished evidence that he or she is ... duly licensed under this chapter to carry out or superintend the work for which the permit has been applied."
Although Martin's actions were the reverse of "fil[ing] as [his] own the license certificate of another," his conduct, we think, was fairly intended to be covered by the proscriptions against falsehood, forgery, and misrepresentation in § 34-8-6. See Lewis & Queen v. N.M. Ball Sons, 48 Cal.2d 141, 308 P.2d 713 (1957), wherein the California Supreme Court noted:
"[T]he statutory provisions setting forth the qualifications for a license and the causes for disciplinary action against licensees, show that the Legislature was as much concerned to protect the public from dishonesty and incompetence in the administration of the contracting business as in the actual use of bricks, mortar, and earth moving equipment."
48 Cal.2d at 149-50, 308 P.2d at 718.
Martin cannot avoid responsibility for a violation of § 34-8-6 and § 34-8-9 by claiming that it was not he, but Kent, the city building officer, who determined that McGuirk was not covered by the general-contractor licensing statutes. "[A] contractor may not plead reliance upon another person in determining what is required under the Law; unlicensed contractors are held to knowledge of the Law's requirements." Construction Financial, LLC v. Perlite Plastering Co., 53 Cal. App.4th 170, 181-82, 61 Cal.Rptr.2d 574, 580 (1997).
Having determined that Martin violated § 34-8-6 and § 34-8-9 by obtaining a permit for McGuirk, we must decide whether that violation constitutes negligence per se and gives the Thomases a civil action in negligence against Martin. In Flint City Nursing Home, Inc. v. Depreast, 406 So.2d 356 (Ala.1981), the Alabama Supreme Court examined the question whether violation *171 of a statutein particular, a licensing statuteconstitutes negligence per se and establishes a cause of action against the violator.
In Depreast, a nursing home resident fell from a window and died. The decedent's administrator sued the nursing home, alleging negligence. One of the issues on appeal was whether evidence of the nursing home's lack of licensure was admissible to prove negligence per se.
"The doctrine of negligence per se or negligence as a matter of law is based upon the principle that when an act is forbidden, or required, by an express provision of law, the legislature has adopted an absolute required standard of care which replaces the common-law standard of the reasonably prudent man. Anyone who violates that law, with resultant injury to one of those the law was intended to protect, is liable regardless of the circumstances. Proof of violation is proof of negligence."
Allen Trucking Co. v. Blakely Peanut Co., 340 So.2d 452, 453 (Ala.Civ.App.1976).
The Depreast court determined that violation of a licensing statute is negligence per se if the following two-pronged test is satisfied:
"(1) The [licensing] statute ... was enacted for the benefit of the person who seeks to invoke its violation as distinguished from the public generally or a class to whom the statute necessarily applies, and
"(2) There was a causal connection between the [violation of the licensing statute] and the injuries suffered."
406 So.2d at 359. See generally Comment, The Doctrine of Statutory Negligence in Alabama, 27 Ala. L.Rev. 155 (1975); Charles O. Gregory, Breach of Criminal Licensing Statutes in Civil Litigation, 36 Cornell L.Q. 622 (1951).
In this case, the first prong of the test was not satisfied. The licensure statutes were not enacted for the benefit of the Thomases as distinguished from the public generally. Instead, the general-contractor licensing statutes were enacted specifically for the public generally. See J & M Industries, Inc. v. Huguley Oil Co., 546 So.2d at 368; Cooper v. Johnston, 283 Ala. at 567, 219 So.2d at 394. Section 34-8-20 provides for the creation of a State Licensing Board for General Contractors
"in order to safeguard life, health, and property, and to promote the general public welfare by requiring that only properly qualified persons be permitted to engage in general contracting."
When a statute "impose[s] a duty for the public at large ... [a]ny individual injured... would acquire no new right by virtue of the enactment of the statute[]." Depreast, 406 So.2d at 360 (citing Lindsey v. Barton, 260 Ala. 419, 422, 70 So.2d 633, 635 (1954)). Accord Tydings v. Loewenstein, 505 A.2d 443 (Del.Super.Ct.1986) (land surveyor who practiced engineering without a license was not liable for negligence per se because the licensing statute was enacted for the public safety and did not define a standard of conduct); Finkle v. Mayerchak, 578 So.2d 396 (Fla.Dist.Ct. App.1991) (regulatory statute requiring contractors to be licensed did not create a private right of action by homeowners against one who obtained a building permit for an unlicensed contractor); Lynn v. Overlook Development, 328 N.C. 689, 403 S.E.2d 469 (1991) (wherein the court observed that it was "unclear" whether home buyers were within the class of persons intended to be protected by a statute prohibiting the city building inspector from issuing a building permit to one who did not hold a valid general contractor's license, but the court concluded that, even assuming buyers were in the class benefited, buyers had not shown that building inspector's alleged negligence was the proximate cause of their injuries); Hurst v. Sandy, 329 S.C. 471, 494 S.E.2d 847 (S.C.App.1997) (home buyers who contracted with an unlicensed engineer did not have a private right of action in negligence against engineer because the purpose *172 of the licensing statute was to regulate the engineering profession and to protect the general public). See also Tellez v. Saban, 188 Ariz. 165, 933 P.2d 1233 (Ariz.App.1996) (violation of statute prohibiting rental-car company from knowingly renting car to unlicensed driver did not constitute negligence per se); Fischer v. Metcalf, 543 So.2d 785 (Fla.Dist.Ct.App. 1989) (child had no civil cause of action against father's psychiatrist for failure of psychiatrist to make report of child abuse as required by statute); Turek v. St. Elizabeth Community Health Center, 241 Neb. 467, 472, 488 N.W.2d 567, 571 (1992) (because the purpose of a statute regulating the licensing of nurses was to secure the safety and welfare of the general public, individual who was injured by an unlicensed nurse had no private right of action based on violation of the statute).
Based on the foregoing authorities, we conclude that, although Martin's obtaining the building permit for McGuirk constituted a violation of § 34-8-6 and § 34-8-9 and exposed Martin to criminal liability for a Class A misdemeanor, it did not provide a civil cause of action for the Thomases. Because the Thomases had no valid negligence claim against Martin for his violation of the licensing statutes, any error in giving a contributory negligence charge was harmless as to this particular allegation of negligence.

(2) Negligence Based on a "Voluntary Undertaking"

At trial, the Thomases argued that, by obtaining the building permit, Martin undertook a duty to see that the construction project complied with all building-code requirements and was completed in a good and workmanlike manner. The Thomases claimed that Martin breached that duty by failing either to oversee McGuirk or to complete the project himself when requested to do so. On the issue of Martin's negligence, the trial court charged the jury:
"If you are reasonably satisfied from the evidence that the defendant Don Martin Construction Company, Inc. voluntarily attempted to do anything for the plaintiffs, as is alleged by the plaintiffs, such as obtaining a building permit from the City of Alabaster, then said defendant owed the plaintiffs the duty to exercise such care as a reasonably prudent person would have exercised under the same or similar circumstances."
That charge instructed the jury to decide the factual question whether Martin, by acquiring the building permit for the Thomases' construction project, "voluntarily attempted to do anything for [the Thomases]." The instruction tracked § 324A, Restatement (Second) of Torts (1965):
"One who undertakes, gratuitously or for consideration, to render services to another which he should recognize as necessary for the protection of a third person or his things, is subject to liability to the third person for physical harm resulting from his failure to exercise reasonable care to protect his undertaking if
"(a) his failure to exercise reasonable care increases the risk of such harm, or
"(b) he has undertaken to perform a duty owed by the other to the third person, or
"(c) the harm is suffered because of reliance of the other or the third person upon the undertaking."
The Alabama appellate courts have not addressed the question whether liability in a case such as this can be predicated on the principle of § 324A. However, in cases with similar facts, courts of other jurisdictions have approved jury charges based on § 324A. See Hurst v. Sandy, 329 S.C. 471, 494 S.E.2d 847 (S.C.App.1997). See also Murthy v. N. Sinha Corp., 644 So.2d 983, 985 (Fla.1994) (although regulatory statute requiring contractors to be licensed did not create a private right of action against one who obtained a building permit for an unlicensed contractor, homeowners could recover under a "common law theory of negligence"); *173 Finkle v. Mayerchak, 578 So.2d 396 (Fla.Dist.Ct.App.1991) (same).
In Hurst v. Sandy, the Hursts contracted with William Sandy, a draftsman-contractor, to design and build a residence for them. The lending company refused to finance the construction of the house without the seal of a registered professional engineer or architect on the house plans. William Sandy's father, Floyd Sandy, was a professional engineer, but he was unregistered in South Carolina. Floyd Sandy's seal of approval subsequently appeared on the construction plans, the loan was approved, and the house was built. When the Hursts discovered numerous construction defects in their house, they sued both William Sandy and Floyd Sandy, alleging breach of contract and negligence. Floyd Sandy moved for a summary judgment on both claims. The trial court entered a summary judgment for Floyd Sandy on the contract claim, but, on the negligence claim, the court held that there was a genuine issue of material fact as to whether Floyd had undertaken to perform a duty owed by his son William to the Hursts. The South Carolina appellate court agreed.
The trial court's negligence charge instructed the jury to determine whether Martin had undertaken to perform a duty owed by McGuirk to the Thomases. The instruction parallels § 324A and the charge approved in Hurst v. Sandy, and it appears to be a correct statement of the law. We acknowledge that certain language in Cooper v. Johnston, 283 Ala. 565, 219 So.2d 392 (1969), seems to indicate that one in Martin's position simply has no duty to owners like the Thomases, but we conclude that the language is dictum and that our supreme court would, if presented with the issue now before us, choose not to follow it.
In Cooper, an unlicensed contractor, Johnston, agreed with a licensed contractor, Gunn Lumber Company, to pay Gunn for the use of its license to perform a construction project for Cooper. When Cooper failed to pay Johnston, Johnston sued, alleging breach of contract. Cooper counterclaimed against Johnston (but did not sue Gunn), arguing that Johnston could not enforce the contract because he was an unlicensed contractor. Our supreme court stated:
"We construe the [agreement between Johnston and Gunn] to be nothing more than an effort on the part of Gunn Lumber Company, based on a consideration, to permit [Johnston] to use its license in the execution of the contract for the erection of the building.... The [agreement] was just an attempt on the part of [Johnston] to escape the provisions of [the predecessor to § 34-8-1 et seq.] and to operate in the field of general contracting contrary to law. Gunn Lumber Company was in no way responsible for the erection of the building, nor was it a party directly or indirectly, to the contract of [Johnston] for such erection. We find no provision in [the statute] permitting one to use the contractor's license of another in the manner here undertaken."
283 Ala. at 569, 219 So.2d at 395-96 (emphasis added).
Although the Thomases had no viable negligence claim against Martin based upon Martin's violation of § 34-8-6 and § 34-8-9, they did have a common-law negligence claim based upon Martin's alleged "undertaking," and the trial court correctly instructed the jury on that claim. Thus, we must decide whether the contributory negligence alleged by Martinthat the Thomases themselves were negligent because they knew McGuirk was unlicensed, yet allowed McGuirk to proceed with the construction projectwas a defense to that claim.
We have found no reported decision addressing the argument, in a claim of negligent undertaking, that an owner's knowledge of a contractor's unlicensed status constitutes evidence of the owner's contributory negligence. The "knowledge" argument, *174 however, has frequently been made in the context of a breach-of-contract case, with the unlicensed contractor arguing that the owner's knowledge that the contractor was unlicensed estops the owner from insisting that the contractor cannot enforce the contract. A variant of that argument has been rejected by our supreme court, see Cochran v. Ozark Country Club, Inc., 339 So.2d at 1024, and is generally rejected by the courts of other jurisdictions, see, e.g., Mascarenas v. Jaramillo, 111 N.M. 410, 806 P.2d 59 (1991); Wagner v. Graham, 296 S.C. 1, 370 S.E.2d 95 (1988).
In Cochran, the owners agreed to pay an unlicensed contractor over $36,000 to build a swimming pool. The contractor, realizing that he was in violation of the $20,000 threshold under the licensing statutes, divided the job into two separate contracts of less than $20,000 each. When the owners failed to pay him, the contractor sued, alleging breach of contract. In response to the owners' assertion that the contract was unenforceable because the contractor was unlicensed, the contractor argued that the owners were "estopped from asserting the illegality of the contract because they [were] guilty themselves of inequitable conduct." 339 So.2d at 1024. The Alabama Supreme Court held:
"The contention is not well founded. Plaintiff cannot, by way of estoppel, endow with validity a transaction which is illegal and against public policy."
Id. In Wagner v. Graham, the South Carolina court stated:
"Assuming ... that ... the Homeowner was at the time of the agreement aware of the fact that the Contractor did not have a license, it would be of no comfort to the Contractor. The statute, as enacted by the Legislature, is for the benefit of the public. If one might avoid the impact of the statute by applying the law of estoppel, one could, by a similar reasoning, avoid the act by agreement between the Contractor and Homeowner. Clearly, this would not be allowed."
296 S.C. at 3, 370 S.E.2d at 96. In Mascarenas v. Jaramillo, the New Mexico court held:
"As a matter of public policy, an unlicensed contractor may not retain payments made pursuant to a contract which requires him to perform in violation of the [general-contractor licensing] Act. This is true even if, as here, the consumer has knowledge that the contractor is unlicensed. The public policy behind the licensing requirement of the Act is so strong that the element of consumer knowledge is of no consequence in our decision."
111 N.M. at 414, 806 P.2d at 63 (emphasis added). See also Hydrotech Systems, Ltd. v. Oasis Waterpark, 52 Cal.3d 988, 997, 277 Cal.Rptr. 517, 523, 803 P.2d 370, 376 (1991) (an unlicensed contractor cannot recover on the contract even when the person for whom the work was performed knew the contractor was unlicensed); Jackson v. Holder, 495 A.2d 746, 748 n. 3 (D.C.Ct.App.1985) ("the party contracting to provide services without the necessary license will not be allowed to recover, even though a member of the class for whom the licensing law was designed to offer protection enters the contract knowing that services are to be rendered in the absence of a license"); Butler v. Obayashi, 71 Haw. 175, 177, 785 P.2d 1324, 1325 (1990) (holding that an unlicensed contractor was barred from recovering for breach of contract even when the owners knew that the contractor was unlicensed, the court observed that "harsh results" sometimes occur in furtherance of the public policy underlying contractor licensing statutes).
In 1976, our supreme court held, in Cochran, that an owner in a dispute with an unlicensed contractor is not estopped by its own "inequitable conduct" from asserting the invalidity of the contract. Six years later, however, in Architectural Graphics & Constr. Servs., Inc. v. Pitman, *175 417 So.2d 574 (Ala.1982), the court seemed to indicate that the question was still open. In Pitman, the unlicensed contractor argued that the owners "were equally guilty of violating the licensing statute" and were "in pari delicto, and the trial court should have left all guilty parties as it found them." 417 So.2d at 576. The supreme court found that the "argument ha[d] some appeal," but refused to address it because it was not supported by the record. Id.
Martin does not argue that the Thomases were in pari delicto with him; he argues that they were contributorily negligent. There is a difference.
"`In pari delicto, potior est conditio [defendentis],'... means that `where the wrong of the one party equals that of the other, the defendant is in the stronger position.'"
Van Antwerp v. Van Antwerp, 242 Ala. 92, 99, 5 So.2d 73, 79 (1941) (emphasis added). In order for a plaintiff to be barred from recovery under the doctrine of in pari delicto, he must be equally guilty with the defendant. However, in order for a plaintiff to be barred from recovery by the affirmative defense of contributory negligence, he need not be as negligent as the defendant. See generally Slade v. City of Montgomery, 577 So.2d 887, 892 (Ala. 1991).
A plaintiff who knows of a contractor's unlicensed status is not, by that knowledge alone, deemed to be in pari delicto so as to be barred from recovering. See, e.g., Mascarenas v. Jaramillo, 111 N.M. at 411, 806 P.2d at 63; Wagner v. Graham, 296 S.C. at 3, 370 S.E.2d at 96. In order to be deemed in pari delicto with the unlicensed contractor, the plaintiff must have actively participated with the unlicensed contractor in misrepresenting the nature of the contract or the status of the contractor. See, e.g., Castro v. Sangles, 637 So.2d 989 (Fla.Dist.Ct.App.1994) (property owners barred from recovery because they personally obtained building permit by misrepresentation); Kirkendall v. Heckinger, 105 Mich.App. 621, 307 N.W.2d 699 (1981) (same). A plaintiff who knew of a contractor's unlicensed status but who did not participate with the contractor in a misrepresentation is allowed to recover because of the public policy underlying the general-contractor licensing statutes. See Jackson v. Holder, 495 A.2d at 748 n. 3; Butler v. Obayashi, 71 Haw. at 177, 785 P.2d at 1325; Mascarenas v. Jaramillo, 111 N.M. at 414, 806 P.2d at 63; Wagner v. Graham, 296 S.C. at 3, 370 S.E.2d at 96. See generally Hortenstein v. Clark, 232 Ala. 479, 168 So. 564 (1936), wherein the Alabama Supreme Court stated:
"[W]hen the contract is illegal, so that both parties are to some extent involved in the illegality,in some degree affected by the unlawful taint,but are not in pari delicto,that is, both have not, with the same knowledge, willingness, and wrongful intent, engaged in the transaction, or the undertakings of each are not equally blameworthy,a court of equity may, in furtherance of justice and of a sound public policy, aid the one who is comparatively the more innocent, and may grant him full affirmative relief."
232 Ala. at 480-81, 168 So. at 565. See also State ex rel. v. Holston Trust Co., 168 Tenn. 546, 79 S.W.2d 1012 (1935), wherein the Tennessee Supreme Court explained:
"`[W]here contracts or transactions are prohibited by positive statutes, for the sake of protecting one set of men from another set of men; the one from their situation or condition being liable to be oppressed or imposed upon by the other, there the parties are not in pari delicto.'"
168 Tenn. at 560-61, 79 S.W.2d at 1017 (quoting Ohio Life Ins. & Trust Co. v. Merchants' Ins. & Trust Co., 30 Tenn. (11 Hum.) 1, 14, 53 Am. Dec. 742, 752-53 (1850)).
If the Thomases could not, by their mere knowledge of McGuirk's unlicensed status, be considered equally as guilty as Martin, who obtained a building permit for McGuirk, and the Thomases would not, therefore, be barred from recovering *176 against Martin by the doctrine of in pari delicto, then they should not be barred from recovering against Martin by the defense of contributory negligence.
We hold that the Thomases had only one viable negligence claim against Martin and that it arose out of Martin's alleged negligent undertaking. We also hold that the contributory-negligence charge given by the trial court was error as to the negligent-undertaking claim. Therefore, the Thomases are entitled to a new trial on their claim of negligent undertaking against Martin. They are also entitled to a new trial on their negligence claim against McGuirk because (1) McGuirk did not assert the affirmative defense of contributory negligence, (2) the trial court did not restrict its contributory-negligence charge to the claims against Martin, and (3) there is a chance that the jury may have erroneously applied the doctrine of contributory negligence to bar the Thomases' negligence claim against McGuirk.

II.
The Thomases argue that the trial court erred by refusing to give the following written requested charge to the jury:
"The court charges the jury that the services of a registered architect or registered professional engineer shall be required on all schools, churches, auditoriums or other buildings intended for assembly occupancy of people."
The requested charge states a correct proposition of law. See Ala.Code 1975, § 34-2-32(b). Cf. Charlebois v. J.M. Weller Associates, Inc., 72 N.Y.2d 587, 531 N.E.2d 1288, 535 N.Y.S.2d 356 (1988) (implying that a "design/build" contract would violate public policy if the "designer" were not a licensed professional engineer or architect). However, the refusal of the charge cannot be made a ground for reversal because TLC did not object to the trial court's failure to give the requested instruction. TLC has not, therefore, preserved this issue for appellate review. Rule 51, Ala. R. Civ. P., states:
"No party may assign as error the giving or failing to give a written instruction, or the giving of an erroneous, misleading, incomplete, or otherwise improper oral charge unless that party objects thereto before the jury retires to consider its verdict, stating the matter objected to and the grounds of objection."
See Royal v. Safety Coatings, Inc., 655 So.2d 927, 932 (Ala.1994).
That part of the judgment in favor of McGuirk and Martin on the contract claims is affirmed. That part of the judgment in favor of the Thomases on McGuirk's counterclaim is also affirmed. However, that part of the judgment in favor of McGuirk on the negligence claim, and that part in favor of Martin on the negligent-undertaking claim, are reversed, and the cause is remanded for a new trial on those claims.
AFFIRMED IN PART; REVERSED IN PART; AND REMANDED.
THOMPSON, J., concurs.
YATES and MONROE, JJ., concur in the result.
ROBERTSON, P.J., concurs in the result only.
NOTES
[1]  See § 34-8-1 et seq., Ala.Code 1975. Our supreme court has held that the general-contractor licensing statute is a measure enacted "for regulation and protection, as distinguished from a law created solely for revenue purposes." Cooper v. Johnston, 283 Ala. 565, 567, 219 So.2d 392,394 (1969).
[2]  Section 40-12-84, Ala.Code 1975, requires a construction contractor to obtain a business license from the probate judge in the county where the contractor has his principal office. Our supreme court has held that § 40-12-84 is not a regulatory statute designed to protect the public from incompetent contractors, but is merely a statute designed to raise revenue. Haskew v. Green, 571 So.2d 1029 (Ala.1990).
[3]  Although the Thomases argued at trial that McGuirk was an unlicensed general contractor, they did not request, and the trial court did not give, any jury instructions on the effect of McGuirk's being unlicensed. Our supreme court has held:

"[A] contract by an unlicensed `general contractor,' as defined in § 34-8-1, is null and void as a violation of ... public policy. Such contracts are illegal and unenforceable by the unlicensed general contractor.
"This rule has been applied to deny recovery where the action is based on the contract itself, or for work, labor, and materials furnished."
Architectural Graphics & Constr. Services, Inc. v. Pitman, 417 So.2d 574, 575-76 (Ala.1982) (citations omitted). See generally Annot., Failure of Building and Construction Artisan or Contractor to Procure Business or Occupational License as Affecting Enforceability of Contract or Right of Recovery for Work Done Modern Cases, 44 A.L.R.4th 271 (1986).
As in Goodwin v. Morris, 428 So.2d 78, 79 (Ala.Civ.App.1983), however, "the case was not tried upon the effect of [the contractor's] lack of a license.... The case was tried on contract law theories." We reach the issue only because it is a preliminary step to our holding on the contributory negligence issue.
[4]  The statute was amended in 1997, effective January 1, 1998, to increase the threshold to construction projects in which "the cost of the undertaking is fifty thousand dollars ($50,000) or more." The statute in effect before the amendment applies in this case.
[5]  N.C.G.S. § 87-1, provided, in pertinent part:

"[A] `general contractor' is defined as one who for a fixed price, commission, fee or wage, undertakes to ... construct any building ... where the cost for the undertaking is $30,000 or more."
