
40 Cal.App.3d 336 (1974)
115 Cal. Rptr. 272
DAVID BARBER, Plaintiff and Appellant,
v.
FLOYD J. LEROY et al., Defendants and Respondents.
Docket No. 42399.
Court of Appeals of California, Second District, Division Five.
June 28, 1974.
*338 COUNSEL
Frank H. Whitehead, Jr., for Plaintiff and Appellant.
Weil & Fritz and Paul M. Weil for Defendants and Respondents.
OPINION
LORING, J.[*]
Plaintiff, David Barber (Barber) filed an action against Floyd J. LeRoy and Violet M. LeRoy (LeRoy) for a deficiency judgment on a promissory note originally in the principal sum of $18,500 which was secured by a security agreement on certain chattels (fixtures used in a cafe business known as the "Hidden Village") and which security agreement had been foreclosed and the chattels sold at private sale for $350 which was credited on the note leaving a balance due on the promissory note of $5,481.91. Barber sought a deficiency judgment for the sum of $5,481.91 plus interest at 7 percent plus $1,000 attorneys fees. LeRoys answered and filed a counterclaim for damages for breach of a lease agreement which was part of the transaction. The trial court found that the private sale of the chattels at which Barber was the successful buyer violated Commercial Code section 9504[1] and that Barber was thereby precluded from recovering a deficiency judgment. The court found that Barber had also breached the lease agreement as a consequence of which LeRoys had suffered damage in the sum of $25,000; that if plaintiff had not breached the lease agreement LeRoys would have remained in possession and Barber would have collected the $5,831.91 balance due on the promissory note; that consequently Barber should be allowed an offset of $5,831.91 against the $25,000 damage. Judgment was entered in favor of LeRoys against Barber on the counterclaim for $19,200. Barber's motion for new trial was denied. Barber appeals from the judgment.

CONTENTIONS
Appellant's contentions may be summarized as follows:
I. Barber was entitled to a deficiency judgment despite noncompliance with the provisions of Commercial Code section 9504, because LeRoys did not plead irregularity of sale as an affirmative defense.
*339 II. LeRoys had a duty to minimize loss.
III. LeRoys were not entitled to a judgment against Barber because the prayer of their answer and counterclaim did not seek affirmative relief, but only requested that Barber "take nothing by his complaint."[2]

FACTS
In 1966 Barber sold to LeRoys a restaurant and beer bar called "Hidden Valley Cafe" in Montebello, California, and executed a written lease of the premises. The sales price was $21,500. A part of the purchase price was in the form of a promissory note in the principal amount of $18,500 secured by a security agreement on the fixtures and equipment used in the cafe; the note was payable in monthly installments of $750 per month principal and interest until the sum of $4,000 had been paid on principal after which the monthly payments were to be $225 per month on principal and interest. The lease was for four years beginning December 1, 1966 and ending November 30, 1970, at a total rental of $14,400 payable at the rate of $350 per month.
On November 5, 1970, LeRoys defaulted on the monthly payments due under the note, Barber took possession of the chattels covered by the security agreement and after notice to the LeRoys conducted a private sale in his attorney's office at which sale he purchased the chattels for $350 and credited the proceeds from the sale against the balance due on the note. As a consequence the balance due on the promissory note was $5,481.91. The lease was for a four-year term which expired November 30, 1970. However, it contained an option to renew for four years in the following words:
"Lessor herein grants a four-year (4) option for renewal of this lease at a rental figure to be agreed upon mutually between the parties at that time depending of [sic on] the increase of taxes at that time; Lessee to agree to the option within sixty (60) days prior to expiration of the original 4-year lease in writing with the Lessor."
LeRoys attempted to exercise the option. The court found that the increase in taxes from 1965-1966 to 1970-1971 would have justified an increase of $50 per month in the rental. However, Barber demanded an increase of $450 per month.
*340 Barber sold the business to a Mr. Quinn six months after foreclosing the chattel security agreement for $15,000 and a lease at $450 per month increasing at the rate of $25 per month per year. In its memorandum decision the court said that in conducting the sale of chattels, Barber failed to comply with the requirements of Commercial Code section 9504; because Commercial Code section 9504 required a public sale and that Barber breached the lease; that the business had a value of $25,000 but if LeRoys had been allowed to continue the business LeRoys would have paid Barber the $5,831.91 balance due on the note; that they therefore were damaged in the sum of $19,200. Judgment was awarded in favor of LeRoys in the sum of $19,200 plus attorneys fees in the sum of $800 under the provisions of Civil Code section 1717.
The security agreement under which the chattels were pledged as security for the promissory note, after providing for acceleration of the balance due in the event of default, contained the following provisions:
"The secured party shall have the right to reduce its claim to judgment, foreclose the Security Agreement, or otherwise enforce the security interest by any available judicial procedure, and secured party may forthwith take possession of the hypothecated property wherever the same may be found, without liability for trespass, and such taking of possession may be made without notice to debtors, said notice being expressly waived, and upon taking possession of the hypothecated property, the secured party shall have the right to sell such property at public or private sale (emphasis added), provided that secured party shall have given notice of such sale in accordance with the provisions of Section 9504(3) of the Uniform Commercial Code or the secured party may propose to retain such hypothecated property in satisfaction of the debtors' obligation to the secured party. In the event of the sale of the collateral at public or private sale as aforesaid (emphasis added), the secured party, subject to the provisions of said Section 9504(3) of the Uniform Commercial Code may become the purchaser thereof, and the proceeds from such sale may be applied by the secured party, first to the cost of such sale, the unpaid interest, collection costs and attorneys fees actually incurred in the taking and sale of said property, and second, upon the unpaid balance of said note and this security agreement, debtors agree to pay to the secured party forthwith any deficiency which may exist between the net amount received from the sale of the collateral and the gross amount unpaid as in said promissory note, and this security agreement provided, and in the event that the net proceeds received from the sale of the collateral shall exceed said gross *341 amount, the secured party agrees to pay forthwith such overplus with interest to the person or persons entitled thereto."

DISCUSSION
It should be noted at the outset that there was some ambiguity in the written opinion ("Notice of Intended Decision") of the trial court, wherein it said: "Commercial Code section 9504 requires a public sale unless the collateral is customarily sold in a recognized market or is the subject of widely or regularly distributed standard of price quotations. Neither exception is applicable to the collateral in this case, and a public sale was necessary." We do not so read section 9504. We do not find any such requirement. The language which the court probably had in mind reads as follows: "The secured party may buy at any public sale and if the collateral is customarily sold in a recognized market or is the subject of widely or regularly distributed standard price quotations he may buy at private sale." Barber bought at the private sale. But since it was not the type of private sale outlined in the quoted language, Barber was prohibited by section 9504 from purchasing the collateral at the private sale. The court clarified the matter in its formal findings.[3] In arguing that he is entitled to a deficiency judgment notwithstanding noncompliance with Commercial Code section 9504, subdivision (3), because LeRoys did not raise the failure to give proper notice or irregularity of sale as an affirmative defense, Barber places great emphasis on certain language used in the recent case of Atlas Thrift Co. v. Horan, 27 Cal. App.3d 999 [104 Cal. Rptr. 315], wherein the court at page 1009 said: "The most natural and reasonable construction of the statutory language, in the light of the legal background, the realities of the relationships involved between secured creditors and debtors who have defaulted and their respective financial resources for engaging in litigation, all lead to the conclusion that the right to a deficiency judgment depends on compliance with the statutory requirements concerning dispositions and notice.
*342 "The rule and requirement are simple. If the secured creditor wishes a deficiency judgment he must obey the law. If he does not obey the law, he may not have his deficiency judgment.
"Plaintiff in the instant case clearly failed to comply with section 9504, subdivision (3), of the Commercial Code in at least two respects. He failed to give the required notice and he failed to conduct the sale in a commercially reasonable manner. We hold this failure to be a bar to a deficiency judgment where, as here, such failure was raised as an affirmative defense."
In the Atlas Thrift Co. case defendant pleaded noncompliance as an affirmative defense. The precise question involved on this appeal is whether or not a debtor loses the protection of section 9504, subdivision (3), by failing to plead a breach thereof as an affirmative defense. We note that section 9501, subdivision (3), provides in part: "To the extent that they give rights to the debtor and impose duties on the secured party, the rules stated in the subdivisions referred to below may not be waived or varied except as provided with respect to redemption of collateral (Section 9506) but the parties may by agreement determine the standards by which the fulfillment of these rights and duties is to be measured if such standards are not manifestly unreasonable:... (b) Subdivision (3) of Section 9504 which deals with disposition of collateral."
Commercial Code section 9504, subdivision (3), makes provision not only for personal notice to the debtor in the event of private sale, but it also requires that the secured party who conducts a sale of collateral shall act "in good faith and in a commercially reasonable manner." These two sections are adaptations of the uniform commercial code. Although the language of the California statutes and the uniform commercial code varies slightly the legal import so far as the case at bar is concerned is substantially identical. Cases from other states which have interpreted the comparable language in the uniform commercial code have held against the contention of Barber. (1a) In the first place cases have held that an antecedent waiver of the statutory requirements is contrary to public policy and a sale conducted in violation thereof is invalid (C.I.T. Corporation v. Haynes, 161 Me. 353 [212 A.2d 436]; Norton v. National Bank of Commerce of Pine Bluff, 240 Ark. 143 [398 S.W.2d 538]) so that the waiver language of the security agreement may not be relied upon by Barber as permitting him to personally buy at a private sale.
Section 9504, subdivision (3), requires not only notice to the debtor, but that the sale of collateral be conducted in a "commercially reasonable *343 manner" and those are two of the duties imposed on the secured party which section 9501, subdivision (3), provides may not be waived in advance. Consequently, cases from other states interpreting comparable sections of the uniform commercial code have held that the secured party who conducts a sale of collateral has the burden of proving compliance with section 9504, subdivision (3). (Mallicoat v. Volunteer Finance and Loan Corp. (1966) 57 Tenn. App. 106 [415 S.W.2d 347]; First National Bank of Bellevue v. Rose, 188 Neb. 362 [196 N.W.2d 507]; Twin Bridges Truck City, Inc. v. Halling (1973 Iowa) 205 N.W.2d 736; Vic Hansen & Sons, Inc. v. Crowley, 57 Wisc.2d 106 [203 N.W.2d 728].)
In First National Bank of Bellevue v. Rose, supra, the court held that a general denial by the debtor was sufficient to put in issue and compel creditor to prove all of the elements which were essential to its recovery, i.e., "To establish that every aspect of the sale was commercially reasonable was essential to plaintiff's case and the issue was clearly within the pleadings." The court also held that inadequate price at the private sale was an element to consider in determining whether or not the sale was in a commercially reasonable manner. The out-of-state cases hold that a secured party who does not allege and prove compliance with the statutory requirements is prohibited from collecting a deficiency judgment. (Vic Hansen & Son, Inc., supra; Leasco Data Process. Equip. Corp. v. Atlas Shirt Co., 66 Misc.2d 1089 [323 N.Y.S.2d 13].) "If he does not obey the law he may not secure a deficiency judgment." (T. & W. Ice Cream, Inc. v. Carriage Barn, Inc., 107 N.J.Super 328 [258 A.2d 162].) That when the sale is not conducted in a commercially reasonable manner it extinguishes the debt (Morris Plan Company of Bettendorf v. Johnson, 133 Ill. App.2d 717 [271 N.E.2d 404]), and the secured party is liable to the debtor for the difference between the sale price and the reasonable value of the property. (Harris v. Bower, 266 Md. 579 [295 A.2d 870]; A to Z Rental, Inc. v. Wilson (10th Cir.1969) 413 F.2d 899.) The reasons for these rules seem too obvious to require discussion. Certainly it cannot be said that when a security holder purchases at his own private sale in violation of the express prohibition of section 9504, subdivision (3), that the sale has been conducted in a "commercially reasonable manner."
(2-4) Insofar as the case at bar is concerned, we need only hold that a secured party who conducts a sale of the collateral must allege and prove compliance with the requirements of Commercial Code section 9504, subdivision (3); that the secured party is prohibited from buying at private sale unless he alleges and proves that the collateral is of the excepted type which the collateral in the case at bar was not, and that a *344 defendant does not lose the protection of the statute by failing to affirmatively plead noncompliance as a defense. The language which Barber relies upon in Atlas Thrift Co. which may suggest a contrary rule was not necessary to the discussion of that case and is not in accord with the overwhelming weight of authority interpreting the uniform commercial code.
This conclusion is particularly justified in the case at bar wherein the complaint alleges that the collateral was sold at private sale. If it had alleged the true identity of the buyer (Barber) it would have failed to allege facts sufficient to state a cause of action. The complaint did not allege compliance with Commercial Code section 9504, subdivision (3), or that the sale was conducted in a commercially reasonable manner or that the price obtained was fair or even what price was obtained.
(1b) We further hold that the language of the security agreement which constitutes an antecedent waiver of the provisions of section 9504, subdivision (3), constitutes a violation of section 9501, subdivision (3), is therefore contrary to public policy and consequently it is void. The trial court therefore correctly concluded that Barber was not entitled to a deficiency judgment against LeRoys.
We next turn to Barber's argument that LeRoys had a duty to minimize damage  a principle which the trial court failed to apply in awarding damages to LeRoys in the sum of $19,200. As we have stated the court found that the reasonable value of the business at the time Barber took over was $25,000. The court found that Barber was entitled to a reasonable increase in rent of $50 per month, but that when he demanded $450 per month increased rent he acted in bad faith which constituted a breach of contract and LeRoys were entitled to recover damages in the sum of $25,000 less the balance of $5,481.91 due on the promissory note which would have been paid if they had been allowed to remain in possession. However, Barber argues that this was a "Mom and Pop" operation which required the personal services of the LeRoys; that LeRoys had a duty to minimize damages; that their personal services for the four-year option period would have had some value had they worked elsewhere during that four-year period and that the value of those personal services for the four-year period should also have been deducted from the $19,200. Although Barber's counsel raised the point in argument in the trial court, he made no effort to prove the amount or the value of those personal services. The LeRoys were never even asked whether or not they were gainfully employed elsewhere at the time of trial although they both took *345 the stand on several occasions. (5) It is well settled that the burden of proof with respect to showing matters in mitigation of the damages suffered by the claimant as a result of the wrongful act of a wrongdoer is on the wrongdoer. In Pfingsten v. Westenhaver, 39 Cal.2d 12 at 24 [244 P.2d 395], the court said: "The defendant [plaintiff] having failed to make any showing in reduction of damages, cannot now be heard to complain." (See 14 Cal.Jur.2d, Damages, § 113, p. 734.) In 22 Am.Jur.2d, Damages, section 297, pages 395, 396, the rule is stated as follows: "Insofar as it may be contended that the damages might and should have been minimized by taking steps to reduce the resulting damages or prevent the accrual of damages, generally, the burden of proof rests upon the defendant. Thus, an employer who has wrongfully discharged an employee prior to the termination of the latter's contract has, according to many courts, the burden of showing that the wrongfully discharged employee might with reasonable effort have obtained similar employment and thereby reduced the damages resulting from the breach of contract."
Finally, we consider Barber's contention that LeRoys were not entitled to recover judgment against Barber because their counterclaim did not contain a prayer for specific affirmative relief. Code of Civil Procedure, section 580 reads: "The relief to be awarded to the plaintiff. The relief granted to the plaintiff, if there be no answer, cannot exceed that which he shall have demanded in his complaint; but in any other case, the Court may grant him any relief consistent with the case made by the complaint and embraced within the issue."
Under this section the appellate courts of this state have held that the absence of a prayer is not fatal under the second clause of this section where there is an answer and the case has gone to contested trial. Under such circumstances it is the duty of the court to grant "any relief consistent with the case made by the complaint and embraced within the issues." In Hunt v. Smyth, 25 Cal. App.3d 807 [101 Cal. Rptr. 4], the court said at page 830: "`"[T]he absence of a prayer is not fatal, the court being charged under section 580, Code of Civil Procedure with the duty in a contested case of granting any relief consistent with the case made by the complaint and embraced within the issue."'"
In State of California v. Hansen, 189 Cal. App.2d 604 [11 Cal. Rptr. 335], the court at page 612 said: "Damages may be awarded in a contested case even though not prayed for in the complaint." (Citing Code Civ. Proc., § 580.)
In Vaughn v. Jonas, 31 Cal.2d 586 [191 P.2d 432], the court at page 606 said: "The fact that exemplary damages find no express mention in the *346 prayer of the complaint does not preclude the allowance of such damages upon a contested trial."
In Knoblock v. Waale-Camplan Co., 141 Cal. App.2d 870 [297 P.2d 765], defendants filed a cross-complaint for declaratory relief and the court awarded a monetary judgment which had not been prayed for. Appellant's first ground for reversal was that the court had granted relief which had not been prayed for. The appellate court affirmed the judgment saying: "In the instant action, an answer having been filed, the court was authorized to grant `any relief consistent with the case made by the complaint and embraced within the issue.' (Code Civ. Proc., § 580.) This is true irrespective of the theory upon which the facts were pleaded, the title of the pleading, or what relief was sought by the prayer."
(6) We conclude that the "counterclaim" filed by LeRoys gave Barber adequate notice in the absence of special demurrer that they claimed that his conduct damaged them to the extent of $25,000. Such issue was litigated in the trial court. It was therefore the duty of the trial court to render a judgment on all of the issues which were before the court and which were litigated. The court did so.
The judgment is affirmed.
Ashby, Acting P.J., and Hastings, J., concurred.
NOTES
[*]   Assigned by the Chairman of the Judicial Council.
[1]  Hereafter all references to code sections are to the California Commercial Code unless otherwise indicated.
[2]  We have changed the sequence of the points raised by appellant for clarity of discussion.
[3]  The court made the following findings:

"6. Plaintiff gave Notice to defendants of his intention to sell the chattels at a private sale pursuant to the provisions of Section 9504 of the Commercial Code.
"7. The collateral described in the Security Agreement is not of a type customarily sold in a recognized market or which is the subject of widely or regularly distributed standard price quotations.
"8. Plaintiff as Secured Party purchased the collateral at the private sale for the sum of $350.00.
"9. Plaintiff failed to comply with the provisions of Commercial Code Section 9504."
