
527 N.W.2d 278 (1995)
FIRST WESTERN BANK & TRUST, Plaintiff and Appellee,
v.
Alice WICKMAN, Defendant and Appellant.
Civ. No. 940284.
Supreme Court of North Dakota.
February 13, 1995.
James J. Coles of Snyder Coles Lawyers, Bismarck, for defendant and appellant.
Richard P. Olson of Olson Burns Lee & Larson, Minot, for plaintiff and appellee.
SANDSTROM, Justice.
Alice Wickman appeals from an order denying her motion to partially vacate a prior judgment. The motion was made under Rule 60(b)(iv), N.D.R.Civ.P., alleging the foreclosure judgment was partially void to the extent the amount exceeded the amount stated in the notice before foreclosure. We affirm the order, holding the notice before *279 foreclosure does not affect the actual amount due.

I
Alice Wickman received $600,000 from First Western Bank & Trust in exchange for a mortgage on Wickman's real property. Wickman defaulted on the loan and the bank immediately accelerated the full amount due and payable. The bank served a "Notice of Intention to Foreclose Real Estate Mortgage" on Wickman, as required under N.D.C.C. § 32-19-20. The notice stated Wickman must pay the bank a total of $532,640.66 in principal and interest within thirty days or foreclosure proceedings would be commenced.
The trial court found that Wickman owed the bank $604,849.93 in principal and interest. Wickman disputed the bank's computations of the amount due, but did not introduce any evidence of her own. A judgment was entered for the bank on February 6, 1992. Wickman did not appeal.
On March 5, 1993, Wickman moved to correct a clerical error in the judgment under Rule 60(a), N.D.R.Civ.P. The trial court denied the motion and this Court affirmed, holding there was no clerical error in the judgment. See First Western Bank v. Wickman, 513 N.W.2d 62 (N.D.1994).
On April 13, 1994, Wickman again filed a motion attacking the February 6, 1992, judgment. This time Wickman alleged the judgment was partially void, under Rule 60(b)(iv), N.D.R.Civ.P. Wickman argued the judgment was void to the extent it exceeded the amount stated in the notice before foreclosure. The trial court denied the motion in an order dated August 23, 1994.
The trial court had jurisdiction to hear the motion under Art. VI, § 8, N.D. Const., and N.D.C.C. § 27-05-06. This Court has jurisdiction under Art. VI, § 6, N.D. Const., and N.D.C.C. § 28-27-02(2). The appeal is timely under Rule 4(a), N.D.R.App.P.

II
Wickman argues the amount stated on the notice before foreclosure is the maximum amount the bank should have recovered in the foreclosure judgment. She relies on Rule 60(b)(iv), N.D.R.Civ.P., in her argument to partially vacate the judgment for the amount it exceeds the amount stated in the notice. Rule 60(b)(iv) provides:
"On motion and upon such terms as are just, the court may relieve a party or a party's legal representative from a final judgment or order in any action or proceeding for the following reasons: ... (iv) the judgment is void; ...."
Rule 60(b)(iv), N.D.R.Civ.P.
Our standard of review for motions under Rule 60(b)(iv) is plenary. A motion under subdivision iv is not left to the court's discretion. The court's task is purely to determine the validity of the judgment. If the judgment is valid, the motion must be denied. If the judgment is void, the court has no discretion to protect it. First Nat'l Bank of Crosby v. Bjorgen, 389 N.W.2d 789, 793 (N.D.1986). The question to be resolved is whether the judgment is void as a matter of law. Bjorgen.
Under North Dakota law, a judgment is void if the court lacked subject matter jurisdiction over the action or if the court lacked personal jurisdiction over the parties. Matter of Estate of Hansen, 458 N.W.2d 264, 268 (N.D.1990). Wickman concedes the trial court had personal jurisdiction.
Wickman contends the trial court did not have the power to enter a judgment in an amount greater than the notice amount. The statute governing notice before foreclosure provides:
"At least thirty days and not more than ninety days before the commencement of any action or proceeding for the foreclosure of a mortgage on real estate, a written notice shall be served on the title owner of record of the real estate described in the mortgage as shown by the records in the office of the register of deeds of the county in which such real estate is situated."
N.D.C.C. § 32-19-20.
In Northwestern Nat'l Life Ins. v. Delzer, 425 N.W.2d 365 (N.D.1988), this Court reviewed N.D.C.C. § 32-19-20 and its predecessor *280 to determine whether an error in the notice before foreclosure deprived the trial court of subject matter jurisdiction. Delzer at 366-67. As originally enacted, the notice provisions expressly provided "[a]ny action or proceeding which shall be commenced to foreclose a mortgage on real property shall be void unless" a valid written notice was first served upon the title owner. Delzer at 367 (quoting 1919 S.L. ch. 131, § 1) (emphasis added in Delzer). Two years later, the Legislative Assembly amended the statute, deleting the provision that voided subsequent proceedings if not in compliance with the notice provisions. Delzer (citing 1921 S.L. ch. 66, § 1). Thus, this Court concluded:
"Since 1921, through various amendments, the Legislature has not seen fit to reinsert the `shall be void' language originally included in the 1919 enactment. We believe the deletion of this language evidences a clear legislative intent that failure to strictly comply with the notice provisions does not automatically void all subsequent proceedings as a matter of law."
Delzer.
Wickman attempts to avoid this clear precedent by arguing the judgment is only "partially void," to the extent it exceeds the notice amount. She claims the notice sets a limit on the trial court in its finding of the true amount owed to the bank. Wickman ignores the limited effect of the notice statute.
"The notice of intention to foreclose required to be given by [1921 S.L.] chapter 66, supra, does not affect in any manner the debt secured by the mortgage sought to be foreclosed. It is merely a prerequisite to the foreclosure of the mortgage.... Its purpose is to advise the mortgagor of the contemplated foreclosure to the end that he may make payment or cure the default and thus save the costs and trouble incident to foreclosure. But it does not in any way affect the validity of the mortgage or the amount of the debt secured. It does not constitute a counterclaim or other defense against the collection of such debt."
Larson v. Jacobson, 54 N.D. 69, 73, 208 N.W. 833, 834 (1926) (emphasis added) (citations omitted).
For the trial court to find the correct amount due on the foreclosure, it must have full power to review the evidence and reach its conclusions based on that evidence. Merely misapplying the statute does not deprive a trial court of jurisdiction. To hold otherwise would vest jurisdiction in a trial court subject to divestment upon an erroneous ruling. Delzer at 367-68.
Other statutes governing foreclosure proceedings grant the trial court full authority to find the amount due. "The proceeds of every foreclosure sale must be applied to the discharge of the debt adjudged by the court to be due...." N.D.C.C. § 32-19-10 (emphasis added).
"In any action for the foreclosure of a real estate mortgage or the cancellation or the foreclosure of a land contract, the court may render judgment for the amount found to be due at the time of the rendition of the judgment, and the costs of the action, and may order and decree a sale of the premises described in the mortgage or contract or that part thereof as may be sufficient to pay the amount adjudged to be due and the costs of the action."
N.D.C.C. § 32-19-06 (emphasis added). These statutes grant the trial court authority to order the foreclosed property sold and to apply the proceeds to the amount found to be due.
We conclude the trial court had jurisdiction to enter the correct amount due under the bank's foreclosure action.[1]
*281 III
The order of the trial court is affirmed.
VANDE WALLE, C.J., LEVINE, J., and VERNON R. PEDERSON, Surrogate Judge and LAWRENCE A. LeCLERC, District Judge, concur.
VERNON R. PEDERSON, Surrogate Judge, and LAWRENCE A. LeCLERC, District Judge, sitting in place of NEUMANN and MESCHKE, JJ., disqualified.
NOTES
[1]  Our holding does not contradict this Court's holding in State Bank of Kenmare v. Lindberg, 436 N.W.2d 12 (N.D.1989). In Lindberg, this Court held a creditor may not accelerate the entire mortgage debt until thirty days after the service of notice before foreclosure. The debtor may prevent foreclosure by payment of the amount actually in arrears, the installment, within the thirty-day period. Lindberg at 16; see Norwest Bank of North Dakota v. Frederick, 452 N.W.2d 316, 318 (N.D.1990). Thus, a creditor may not demand more than the actual amount due at the time of notice (the installment due). In Lindberg, this Court specifically noted "the defect in the notice before foreclosure was raised during the pendency" of the foreclosure action. Lindberg at 16. Lindberg did not say the trial court's jurisdiction or the underlying debt was affected by the defective notice. As this Court held in Delzer, defect in the notice must be raised during the pendency of the original action. Delzer at 368. In this case it was not, and in this proceeding Wickman argues the amount stated in the notice was the correct amount.
