This is an action to quiet title, and defendant in his answer asked that he be adjudged the owner of the property. Both parties claim from a common source, one C. A. Kassell, who in 1929 encumbered the property with a trust deed in favor of defendant to secure a promissory note. In 1931 a street improvement bond was issued to one Oswald against the property. In 1934 defendant brought suit on his promissory note without making reference in the complaint to the fact that the note was secured. Judgment was entered against Kassell and a writ of execution issued. The property was sold to defendant in 1936 in partial satisfaction of the judgment. The marshal’s certificate of sale was recorded July 10, 1936, and his deed July 13, 1937. In December, 1936, between the date of the execution sale and the delivery of the deed, Oswald brought an action against Kassell to foreclose the lien of the bond. Defendant was not named or served in that action. Kassell defaulted, foreclosure was ordered, and the property was sold to Oswald on June 1, 1937. Oswald sold his certificate to plaintiff and the commissioner’s deed was issued to him in 1938.
Thereafter, plaintiff brought this action to quiet his title. The parties stipulated that the note sued on by defendant in the municipal court was secured by a trust deed. The trial court found that defendant became the owner of the property by reason of the execution proceedings, subject to the lien of plaintiff’s street improvement bond, and judgment *266 was rendered accordingly. Plaintiff has appealed contending that the judgment on which defendant relies is invalid because of a failure to conform to the requirements of section 726 of the Code of Civil Procedure, which prescribes foreclosure as the one form of remedy for the recovery of a debt secured by mortgage.
It is the general rule that a domestic judgment is not subject to collateral attack unless it is void
on its face. (Hamblin
v.
Superior Court,
It has been held that a mortgagee by his own act alone cannot waive the provisions of section 726 and sue upon the debt
(Bank of Italy
v.
Bentley,
*267
Since necessity often drives debtors to make ruinous concessions when a loan is needed, section 726 should be applied to protect them and to prevent a waiver in advance. This reasoning, however, does not apply after the loan is made, when all rights have been established and there remains only the enforcement of those rights. The situation is analogous to the right of redemption which may not be waived in advance. (Civ. Code, § 2889;
Bradbury
v.
Davenport,
The rule against waivers in advance has been codified by section 2953 of the Civil Code, which was adopted in 1937. This section declares to be void and unenforceable “Any agreement exacted from a borrower as a condition to the making or renewing of any loan secured by a deed of trust, mortgage or other lien . . . whereby the borrower agrees to waive any rights or privileges existing under” certain code sections, including section 726 of the Code of Civil Procedure. Although section 2953 was not in effect at the time of the transactions in question, it is entirely consistent with the right of a mortgagor or trustor to make a subsequent waiver, since by its terms it purports to apply only to a waiver agreement which is exacted in advance as a condition to the making or renewing of any loan secured by a mortgage or deed of trust.
The fact that a note is secured is an affirmative defense which must be pleaded.
(Tucker
v.
Howe,
*268 It follows that section 726 of the Code of Civil Procedure is not necessarily a bar to an action on the note, and that its benefits may be waived by a failure to call the attention of the court to the true situation. Since this is a default judgment, and the attention of the court was not directed to the fact of security, the judgment is not void and cannot be collaterally attacked. In addition, section 726 was enacted for the benefit of the primary debtor. Plaintiff is not the primary debtor, but in fact claims in opposition to him, and should not be permitted to make such an attack.
Defendant urges that plaintiff was not entitled to a judgment subjecting the land to the lien of plaintiff’s bond, but the defendant has not appealed. It is well settled that on appeal errors affecting a party who does not appeal will not be reviewed, even though excepted to by him in the trial court and included'in the bill of exceptions.
(California Canning Peach Growers
v.
Williams,
We conclude, therefore, that plaintiff cannot attack the title defendant acquired at the execution sale, as the judgment on which it was based was not void, and that defendant cannot complain of the provisions of the judgment giving plaintiff a lien on the property because he took no appeal.
This is an action in equity and the decision carries out the principles of equity by giving justice to both parties. Defendant, by suing on the note instead of foreclosing, chose to disregard the security given and to rely on the title secured on the execution sale. Defendant thus made an election of remedies
(Ould
v.
Stoddard,
Having failed to try to cut off the rights of intervening creditors by foreclosing his deed of trust, defendant cannot claim a greater title than his judgment debtor had at the time of the judgment and execution sale, and since the property was then subject to the lien of plaintiff’s street improvement bond, the judgment herein properly quieted title in defendant subject to that lien.
The judgment is affirmed.
Shenk, J., Curtis, J., Edmonds, J,, Carter, J., Traynor, J"., and Schauer, J., concurred.
