RL REGI North Carolina, LLC, (“Plaintiff’) appeals from an order entered 22 March 2012 denying Plaintiff’s motion for summary judgment. Plaintiff also appeals from a judgment entered 1 June 2012 concluding Plaintiff violated the Equal Credit Opportunity Act, declaring void the guarantee agreement signed by Defendant Connie S. Yow on 11 April 2006, and denying Plaintiff’s post trial motion for judgment on the verdict, or in the alternative, for judgment notwithstanding the verdict. Defendant Connie S. Yow cross-appeals from an order entered 22 March 2012 denying her motion for summary judgment, a 27 March 2012 discovery order, and, “[t]o the extent said Judgment is found to be in errorf,]” the judgment entered 1 June 2012. We affirm the judgment of the trial court.
I. BACKGROUND
Plaintiff is the successor in interest to certain loans made by Regions Bank. Defendant Connie S. Yow executed an agreement guaranteeing two of those loans in April 2006 at which time she was married to Defendant Lionel L. Yow. Mr. Yow, along with Defendants Glen C. Stygar and John R. Lancaster (collectively the “LC owners”) formed two entities, specifically, Defendants Lighthouse Cove, LLC, and Lighthouse Cove Development Corp., Inc. (the “LC Entities”), for the purpose of acquiring a tract of land in Brunswick County, consisting of approximately fifty-seven acres (the “Property”) and developing a residential subdivision thereon to be known as Lighthouse Cove.
*73In early 2006, the LC Owners met with Alex King, a commercial lending officer with Regions Bank, to seek financing for the development project. In March 2006, Regions Bank provided a commitment to provide two loans (the “Loans”) to the LC Entities, as borrowers, for the acquisition and partial development of the Property. The aggregate amount committed for the Loans was $4,280,000.00. The commitment provided that the Loans would be seemed by the real estate and guaranteed by the LC Owners. The Loans would also be guaranteed by the LC Owners’ wives, including Defendants Leticia S. Lancaster and Connie S. Yow,1 though neither was an owner, officer or director of either of the LC Entities or otherwise involved in the development project.
In April 2006, the Loans closed under terms consistent with Regions Bank’s commitment through the execution of various documents (the “Loan Documents”) by Defendants.
By 2009, the LC Entities were in default of their obligations under the Loans. In December 2009, Defendants executed a forbearance agreement with Regions Bank in which they acknowledged their obligations under the Loan Documents and in which Regions Bank agreed to modify certain terms. Subsequently, though, the LC Entities defaulted on their obligations under the forbearance agreement.
In September 2010, Regions Bank sold its interest in the Loans, with said interest ultimately being transferred to Plaintiff. Plaintiff filed an amended complaint in this action on 15 March 2011, seeking damages from Defendants relating to the alleged default by the LC Entities of their obligations pursuant to the Loans.2 On 18 April 2011, Defendants filed an amended answer and counterclaim. In this filing, Defendant Connie Yow asserted as an affirmative defense that Plaintiff’s predecessor in interest, Regions Bank, unlawfully obtained her guaranty of the Loans in violation of the federal Equal Credit Opportunity Act (ECOA) codified in Chapter 15 of the United States Code.
On 31 October 2011, Plaintiff moved for summary judgment on all of its claims against all Defendants. On 17 January 2012, Defendant Connie Yow moved for summary judgment, in part, due to Regions Bank’s alleged violation of the ECOA. On 22 March 2012, the trial court entered an order granting summary judgment in favor of Plaintiff on all claims, counterclaims and affirmative defenses, except its claim against *74Defendant Connie Yow for violating the guarantee agreement, concluding that there existed a genuine issue of material fact with regard to her ECOA affirmative defense.
On 21 May 2012, the matter came on for trial. The central issue was summarized by the trial court in its jury instructions:
[T]his is a case in which Plaintiff is seeking to recover a deficiency monetary judgment against Defendant, Connie S. Yow. On the other hand, the Defendant, Connie S. Yow, says that [Plaintiff] should not recover judgment against her because [Regions Bank, Plaintiffs predecessor in interest] violated the Equal Credit Opportunity Act.
The trial court submitted four questions to the jury. Based on the factual findings contained in the jury’s special verdict, the trial court concluded that Regions Bank had procured the guaranty of Defendant Connie Yow (hereinafter, “Defendant”) in violation of the ECOA and that this violation constituted an affirmative defense; and, accordingly, the trial court entered judgment in favor of Defendant. From this judgment, Plaintiff appeals.
II. ANALYSIS
The ECOA is federal legislation which prohibits lending institutions from discriminating against any “applicant” on the basis of “race, color, religion, national origin, sex or marital status, or age[.]” 15 U.S.C. § 1691(a)(1). The Federal Reserve Board has promulgated rules interpreting the ECOA, known as Regulation B codified in 12 C.F.R. § 202.1, et seq. Section 207(d) sets forth rules which creditors must follow regarding, inter alia, their procurement of spousal guaranties. Specifically, the portions of section 202.7(d) relevant to this case provide the following with respect to spousal guaranties:
(d) Signature of spouse or other person-
(1) Rule for qualified applicant. Except as provided in this paragraph, a creditor shall not require the signature of an applicant’s spouse ... if the applicant qualifies [for the loan] under the creditor’s standards of creditworthiness[.]...
(2) Unsecured credit. If an applicant requests unsecured credit and relies in part upon property that the applicant owns jointly with another person to satisfy the creditor’s standards of *75creditworthiness, the creditor may require the signature of the other person only on the instrument(s) necessary ... to enable the creditor to reach the property being relied upon [by the creditor to establish creditworthiness];
(4) Secured credit. If an applicant requests secured credit, a creditor may require the signature of the applicant’s spouse ... to make the property offered as security available to satisfy the debt in the event of default, for example, an instrument to create a valid lien[.]...
(5) Additional parties. If, under a creditor’s standards of creditworthiness, the personal liability of an additional party is necessary to support the credit requested, a creditor may request [an additional person to serve as] a.. . guarantor.... The applicant’s spouse may serve as an additional party, but the creditor shall not require that the spouse be the additional party.
12 C.F.R. § 207(d)(l)-(2), (4)-(5).
In the case sub judice, four issues concerning Plaintiff’s deficiency claim and Defendant’s ECOA defense were submitted to the jury and answered on the verdict sheet as follows:
Issue One: Did Regions Bank seek the spousal guaranty of Defendant Connie S. Yow as additional support for the loans by Regions Bank to the Lighthouse Cove entities before making a determination of whether the applicants for the loans (the Lighthouse Cove entities, Glen Stygar, John Lancaster and her husband Lionel Yow) were independently creditworthy under Regions Bank’s standards of creditworthiness?
Answer: NO
After you answer Issue One please proceed to Issue Two.
Issue Two: Did Regions Bank, under its standards of creditworthiness, fail to make a determination that the personal liability of an additional party, defendant Connie Yow, was *76necessary to support the loans requested by the Lighthouse Cove entities for the real estate development project?
Answer: NO
If your answer to Issue Two is “Yes” please proceed to Issue Four. If your answer to Issue Two is “No” please proceed to Issue Three.
Issue Three: Did Regions Bank require Connie Yow be a guarantor for the loans to the Lighthouse Cove entities?
Answer: YES
After you answer Issue Three please proceed to Issue Four.
Issue Four: Did Regions Bank prior to April 11, 2006 routinely require as a condition of loans spousal guarantees without first ascertaining whether an applicant for credit is creditworthy under Regions Bank’s standards of creditworthiness?
Answer: NO
In its judgment, the trial court concluded that “[bjased on the jury’s answer ‘Yes’ to Issue Three, the Court rules as a matter of law that Regions Bank violated the [ECOA] by discriminating on the basis of marital status, a ‘protected class’ under the [ECOA].” The trial court further concluded that Defendant’s remedy “is to allow her to use the violation of the [ECOA] by Regions Bank as an affirmative defense in the matter,” and Defendant was released from any liability under the Loans. From this judgment, Plaintiff appeals.3
In its brief on appeal, Plaintiff argues (1) that the trial court erred by concluding that Regions Bank violated the ECOA as a matter of law based upon the jury’s affirmative response to Issue Three; (2) that the trial court erred in concluding that a violation by Regions Bank of the ECOA created an affirmative defense for Defendant on Plaintiff’s claims *77under her guaranty; and (3) that Defendant waived any ECOA defense arising under the ECOA by executing the forbearance agreement. We address each argument below.
A. ECOA Violation
Plaintiff first argues that the jury’s answer to Issue Three - that Regions Bank required Defendant to serve as a guarantor as a condition of approval - does not support the trial court’s conclusion that Regions Bank violated the ECOA. Specifically, Plaintiff contends that “the ECOA . . . allows creditors to require spousal guarantees in appropriate circumstances, including those presented in this case.” For this argument, Plaintiff relies on subsection (2) of 12 C.F.R. § 202.7(d), which provides that “the creditor may require” a spouse to sign certain instruments in relation to an application for “unsecured credit.” Id. (emphasis added). Plaintiff argues that Mr. Yow’s guaranty was, in essence, an application for unsecured credit. Accordingly, Regions Bank could require Defendant to execute a guaranty as well. We disagree.
While subsection (2) allows for a creditor to require a spouse of an applicant to execute certain instruments when the credit being sought is unsecured, subsection (5) provides that a creditor, if it deems additional support is needed for a credit, may request that an additional party serve as a guarantor, but that it “shall not require that the spouse be the additional party.” 12 C.F.R. § 202.7(d)(5) (emphasis added.) From our review of the jury instructions pertaining to Issue Three, it is clear that the jury was being asked to resolve whether Regions Bank violated subsection (5), not subsection (2). The following was the jury instruction pertaining to Issue Three:
On this Issue 3, the defendant, Connie S. Yow, has the burden of proof.
Under the ECOA, an applicant spouse may serve as an additional party, but a creditor shall not require that the spouse be the additional party. This is not to suggest that the ECOA prohibits a creditor requesting that the spouse serve as an additional guarantor.
As to Issue 3, in which the defendant, Connie S. Yow, has the burden of proof, if you find by the greater weight of the evidence that Regions Bank required Connie Yow to be a guarantor for the loans to the Lighthouse Cove entities, then it would be your duty to answer this issue yes, in favor of the defendant. If on the other hand, you fail to so *78find, then it would be your duty to answer this issue no, in favor of the plaintiff, RL REGI North Carolina, LLC.
The trial court clearly differentiates between a creditor requesting a spousal guaranty, which is allowed under subsection (5), and requiring a spousal guaranty, which is prohibited under subsection (5). Plaintiff did not object to this instruction. Further, Plaintiff did not argue before the trial court that subsection (2) applied or request a jury instruction concerning subsection (2). We do not believe subsection (2) is applicable, in this case, simply because subsection (2) applies to situations where the credit being sought is unsecured, while the credit extended by Regions Bank to Defendants was secured by real estate. Plaintiffs argument that the guaranty executed by Mr. Yow was actually an extension of unsecured credit - and, therefore, subsection (2) applies - is without merit. Defendant was not required to guarantee her husband’s guaranty agreement; rather, she was required to guarantee the Loans, which were secured by the Property. Accordingly, this argument is overruled.
B. ECOA as an Affirmative Defense
Plaintiff next argues that a mere violation of the ECOA by a creditor in procuring a guaranty does not create an affirmative defense. Specifically, Plaintiff argues that since Regulation B provides a remedy in the form of an award of actual and punitive damages, see 12 C.F.R. § 202.16(b), “the clear legislative intent for remedying a violation of the ECOA is by a claim or counterclaim for damages; not for avoidance of an obligation through an affirmative defense.” The question of whether, under North Carolina law, the procurement of a spousal guaranty in violation of the ECOA may be used as an affirmative defense in a suit to enforce the provisions of a guaranty is a question of first impression.
A number of other state and federal courts have addressed this question and have typically resolved it in one of three ways. See Bank of the West v. Kline, 782 N.W.2d 453, 459 (Iowa 2010); In re Westbrooks, 440 B.R. 677, 683 (M.D.N.C. 2010).
The first approach requires that a debtor can only assert an ECOA violation as a claim or counterclaim for damages, a position supported by Plaintiff in its brief. Bank of the West, 782 N.W.2d at 459; see also F.D.I.C. v. 32 Edwardsville, Inc., 873 F. Supp. 1474, 1480 (D. Kan. 1995); Riggs Nat’l Bank of Washington, D.C. v. Linch, 829 F. Supp. 163, 169 (E.D. Va. 1993), aff'd, 36 F.3d 370 (4th Cir. 1994).
The second approach allows a debtor to assert an ECOA violation as an affirmative defense in the nature of a “recoupment.” Bank of the *79West, 782 N.W.2d at 460; see also Bolduc v. Beal Bank, SSB, 167 F.3d 667, 672 (1st Cir. 1999). Recoupment “allows a defendant to ‘defend’ against a claim by asserting — up to the amount of the claim — the defendant’s own claim against the plaintiff growing out of the same transaction,” even if it was asserted after the statute of limitations applicable to ECOA violation claims has run. Id. at 672.
The third approach allows a debtor to assert an ECOA violation as an affirmative defense based on the defense of illegality. Bank of the West, 782 N.W.2d at 461; see also Integra Bank/Pittsburg v. Freeman, 839 F. Supp. 326, 329 (E.D.Pa. 1993); Still v. Cunningham, 94 P.3d 1104, 1114 (2004); Eure v. Jefferson Nat’l Bank, 248 Va. 245, 252, 448 S.E.2d 417, 421 (1994).
We believe that the third approach above is the most consistent with the law of this State and, therefore, we hold that a guarantor-spouse may assert an ECOA violation as an affirmative defense in an action brought by a lender.
It has long been the law in North Carolina that “an agreement which violates a constitutional statute or municipal ordinance is illegal and void.” Financial Services v. Capitol Funds, 288 N.C. 122, 128, 217 S.E.2d 551, 555 (1975). Our Supreme Court expounded on this principle in the case of Covington v. Threadgill, 88 N.C. 186 (1883). In Covington, a plaintiff sued for the recovery of money owed when he sold the defendant intoxicating liquor. Id. at 186-87. As a defense, the defendant relied upon a statute which prohibited the extension of credit by a bar owner of more than $10 unless the patron actually signed a note. Id. The statute provided a penalty for any violation thereof. Id. at 187-88. In voiding the debt, the Supreme Court stated the following:
The plaintiff, however, insists . . . that inasmuch as the statute does not in positive terms declare the act of selling, though upon a credit and in excess of the designated amount, to be unlawful, but simply prescribes a penalty for it, its effect is not to make the selling so absolutely illegal, as that it will vitiate the whole of the note, or other contract, of which it may form, in part, the consideration. A distinction, like that attempted to be made, between the effect in this regard, of statutes which affirmatively declare acts done in contravention of their provisions to be unlawful, and those which merely visit such acts with penalties, has been at times, and perhaps still is, recognized in some of the authorities, but never in the courts of *80this State. . . . [A]fter considering a vast number of cases upon the subject, they deem the law perfectly settled, that no action will be sustained in enforcement of an executory contract founded upon an immoral consideration, or one against the policy of the law, the due course of justice, or the prohibition of a penal statute, and that a distinction between acts malum in se and malum prohibitum, could no longer be admitted as sound in principle, for that, the law would be false to itself, if it allowed a party through its tribunals to enforce a contract made against the express provisions of a statute[.]
Covington, 88 N.C. at 188-89 (emphasis in original).
In Phosphate Co. v. Johnson, 188 N.C. 419, 423-24, 124 S.E. 859, 863 (1924), our Supreme Court quoted Volume 13 of Corpus Juris with approval as a summary of the principle that an illegal agreement is void:
Where a statute expressly declares that certain kinds of contracts shall be void, there is then no doubt of the legislative intention, and an agreement of the kind voided by the statute is unlawful. The same is true where the contract is in violation of a statute, although not therein expressly declared to be void. ... A statute prohibiting the making of contracts, except in a certain manner, ipso facto, makes them void if made in any other way.
Id. at 429, 124 S.E. at 863-64 (quoting Corpus Juris, Vol. 13, p. 420 el seq.f
The foregoing notwithstanding, our Supreme Court has recognized exceptions to the general principle that contracts which violate a law are to be deemed void. In Marriott Financial Services, Inc. v. Capitol Funds, Inc., our Supreme Court described one such exception in certain circumstances in which the law violated contains a penalty provision:
[T]here is ample authority that the statutory imposition of a penalty, without more, will not invariably avoid a contract which contravenes a statute or ordinance when the agreement or contract is not immoral or criminal in itself. In such cases the Courts may examine the language and purposes of the statute, as well as the effects of avoiding contracts in violation thereof, and restrict the penalty for violation solely to that expressed within the statute itself.
288 N.C. 122, 128, 217 S.E.2d 551, 555 (citing Price v. Edwards, 178 N.C. *81493, 101 S.E. 33 (1919)); see also Hines v. Norcutt, 176 N.C. 123, 96 S.E. 899 (1918). The Court farther stated the following:
The holdings of this Court demonstrate a remarkable divergence in results in cases presenting the question of illegality of contracts because of violation of statutory provisions. The cases generally follow the rule that where certain acts are expressly made illegal, contracts based on such acts are void.
On the other hand, the Court has refused to extend the terms of a penal statute to avoid a contract unless such a result is within the intent of the legislative body.
Capitol Funds, Inc., 288 N.C. at 128-29, 217 S.E.2d at 556 (citations omitted); see also Furr v. Fonville Morisey, 130 N.C. App. 541, 545, 503 S.E.2d 401, 405 (1998) (stating that “[cjourts will not extend the terms of a penal statute to avoid a contract unless such a result was within the intent of the legislature in enacting the statute”).
Having determined that the trial court properly concluded that Regions Bank violated the ECOA based on the jury’s answer to Issue Three, we must apply the above principles to determine whether, under North Carolina law, Defendant may avoid her obligations under the guaranty by way of an affirmative defense. We believe she may. We believe that, in enacting the ECOA, Congress did not intend for the sole remedy available against a creditor for an ECOA violation to be actual and punitive damages under 12 C.F.R. § 202.16(b). Rather, Congress expressly provided in the ECOA that, in addition to actual and punitive damages, “the appropriate United States district court or any other court of competent jurisdiction may grant such equitable and declaratory relief as is necessary to enforce the requirements imposed under this title[.]...” 15 U.S.C. § 1691e(c); see also Bledsoe v. Fulton Bank, 940 F. Supp. 804, 809 (1996) (holding that § 1691e(c) grants state courts concurrent jurisdiction to grant relief in the form of voiding a guaranty executed in violation of the ECOA). Further, allowing Plaintiff in this case to enforce the provisions of Defendant’s guaranty would frustrate an important purpose of the ECOA, which is the eradicative of credit discrimination based on marital status, and would allow Plaintiff to benefit from discrimination that the ECOA seeks to eliminate. We find the Virginia Supreme Court’s reasoning in Eure, supra, persuasive on this point:
To deny [a guarantor-spouse] the right to use the ECOA violation defensively would be to enforce conduct that is *82forbidden by the Act. Such use, therefore, would be contrary to the will of Congress or in any manner inconsistent with or derogatory of the remedies specifically provided by the Act. Indeed, to permit such use would give effect to the clear legislative intent to deter discrimination in the particular area of endeavor regulated by ECOA.
Id. at 252, 448 S.E.2d at 421. Finally, we note that under our Consumer Finance Act, the General Assembly has expressly proscribed discrimination by a lender in the extension of credit based on marital status. N.C. Gen. Stat. § 53-180(d) (2011). Accordingly, we conclude that under North Carolina law, Defendant may use Regions Bank’s violation of the ECOA as an affirmative defense.
C. Forbearance Agreement
Plaintiff finally argues that Defendant waived her right to assert the ECOA as an affirmative defense when she executed the forbearance agreement. Specifically, Plaintiff references a provision in the forbearance agreement which states that Defendant “waives all defenses. ...” However, a defense which allows a party to avoid the obligations of a contract because it was entered into in violation of law cannot be waived by stipulation. Martin v. Underhill, 265 N.C. 669, 673, 144 S.E.2d 872, 875 (1965). Our Supreme Court has held that “[a] stipulation in the most solemn form to waive [a defense of illegality] would be tainted with the vice of the original contract, and void for the same reasons.” Cansler v. Penland, 125 N.C. 578, 581, 34 S.E. 683, 684 (1899). Accordingly, applying these principles, we hold that Defendant has not waived her ECOA defense by virtue of the forbearance agreement.
For the foregoing reasons, we affirm the trial court’s judgment in this case.4
NO ERROR.
Judge CALABRIA and Judge ERVIN concur.. Defendant Glen Stygar was unmarried.
. Plaintiff’s predecessor in interest in the Loans commenced this action in December 2010; however, its interest was subsequently transferred to Plaintiff.
. Plaintiff also noted an appeal from the denial of its motion for summary judgment with regard to Defendant’s affirmative defense, which was based upon Regions Bank’s alleged violation of the ECOA. Further, Defendant cross-appealed from the trial court’s denial of her motion for summary judgment, from a 27 March 2012 discovery order, and, “[t]o the extent said Judgment is found to be in error[,]” the judgment entered 1 June 2012. Plaintiff’s challenge to the denial of its summary judgment motion is unavailing in light of the fact that this case was decided on its merits after a trial by jury. Harris v. Walden, 314 N.C. 284, 286-87, 333 S.E.2d 254, 256 (1985).
. Because we affirm the trial court’s judgment, which was favorable to Defendant, we need not address the issues presented in her cross-appeal.