delivered the opinion of the court.
Appellee, as complainant in the court below, exhibited his bill in the chancery court of Washington county against appellant, seeking recovery of the sum of six hundred and ninety dollars and interest, bid by appellant •at a trustee’s sale foreclosing a deed of trust in which' the appellee is the trustee. Isaiah and L. C. Ballard, on March 12, 1910, executed to Lamar Watson, trustee,' a deed of trust conveying a certain parcel of land in the city of Greenville to secure three promissory notes in favor of one Allen Caldwell. The trust deed provides that:
If default shall be made “in the payment of said notes at maturity, or any one of them-, then the owner and hold-' or may declare all of said notes due and payable and may direct the trustee herein named, or his successors; to foreclose this trust deed by first advertising said land for sale by publishing notices thereof for thirty days, giving in each of said notices the time and terms' and place of the sale, and by posting a copy of said notices at the front door of the courthouse in said county of *92Washington, and sell said property to the highest bidder for cash between the hours prescribed by law for sheriffs ’ sales. ’ ’
The trustee, at the request of the holder of the first of the notes secured, and after all of the notes were due, advertised the property for sale by posting a notice of' the sale at the front door- of the courthouse and by publishing the notice of sale for three weeks in the Green-ville Times. These notices were published on the tenth, seventeenth, and twenty-fourth days of February and the first day of March, 1912; and the sale was made on March 4, 1912. Appellant appeared at the sale and bid, in the name of the Delta Cotton Company the sum of six hundred and ninety dollars; and the lands embraced in the trust deed were struck off and sold to the Delta Cotton Company. Some time thereafter the trustee tendered to appellant a deed signed and acknowledged by the trustee, conveying the property to the Delta Cotton Company; and this deed appellant declined to receive and declined to pay the amount of his bid. The trustee thereupon readvertised the property to be sold July 15, 1912, but abandoned his purpose to resell and did not complete the second publication. On the contrary, he filed the original bill in this cause tendering his trustee’s deed as an exhibit and prayed that appellant, doing business under the name of the Delta Cotton Company, be required by decree of the court to perform his contract, to accept the deed and pay the amount bid. The cause was finally set down' for hearing on bill, answer, and proof; and a decree was entered in accordance with the prayer of the bill. From this decree appellant appeals.
One point argued by counsel for appellant will dispose of this appeal. The trust deed requires thirty days’ advertisement of the notice of sale; and the pleadings and proof show that the notice was posted at the courthouse door on the ninth of February, 1912, and that notice was first published in the newspaper on the tenth of February, 1912. The sale was made on the fourth day of March *93thereafter. It appears from the face of the record that there were only twenty-two days’ publication before the sale was made. Whatever the ruling may be in other jurisdictions, our court is committed to the holding that:
“Where a sale in pais is made by a trustee under an instrument conferring a power of sale upon him under certain prescribed terms and conditions, a substantial compliance with the mode, manner, and terms prescribed is essential to pass the title, and any disregard of. them in any important respect will vitiate the sale.” Enochs v. Miller, 60 Miss. 19.
In the Enochs Case, the trust deed required thirty •days’ notice and the sale took place upon twenty-six days’ notice. Chalmers, J., in the opinion says:
‘ ‘ The court below properly held that the purchaser acquired no title.”
’ It is argued by counsel for appellee that this case of Enochs v. Miller, supra, was decided before the enactment of section 2772 of the Code of 1906. This statute, among other provisions, declares that:
“Sale of said lands shall be advertised for three consecutive weeks preceding such sale, in a newspaper published in the county, or if none is so published, in some oaper having a general circulation therein, and by posting one notice at the courthouse of the county where the land is situated, for said time. No sale of lands under a deed of trust or mortgage shall be valid unless such sale shall have been advertised as herein provided for, regardless of any contract to the contrary. . An error in the mode of sale such as makes the sale void will not be cured by any statute of limitations, except as to the ten years statute of adverse possession.”
It is contended that this statute was complied with in the instant case, and that a compliance with the terms of ■lie statute is all that is required. We do not understand that this section takes away the right of the parties to '■ontract for a longer period of advertisement than that required by the statute. If the trust deed requires less *94than three weeks’ advertisement, its provisions would then be in conflict with the statute, and the terms of the statute must and would prevail; if the trust deed, however, requires more than three weeks’ advertisement,. then the terms of the trust deed as to notice and adver-, tisement must be followed and complied with in accordance with the contract of the parties. In this instance the contract of the parties provides for thirty days’ notice, and thirty days’ notice is not at all in conflict with the statute but in harmony with it. The statute was evidently enacted in the interest of debtors and for the security of land titles acquired under foreclosure. It was a common practice before the enactment' of the statute to execute deeds of trust providing for ten days’ notice of sale and on such short notice to foreclosure trust deeds on valuable tracts of lands and the homes of humble debtors. The statute was designed, among other things, to give due publicity to sales under deeds of trust by requiring a reasonable notice of sale, the posting of one notice at the courthouse door of the county where the land is situated, and publication in a newspaper of that county — wise provisions calculated not only to give due notice to the owner of the lands but also to prospective bidders.
The statute by its language does not make unlawful further and additional provisions agreed upon by the parties providing for a longer period of advertisement or additional precautionary methods in the interest of the mortgagor. The.right to contract is sacred, and the parties should be left free and untrammeled in their right to agree upon and incorporate any lawful provisions not in conflict with the statute in question. The deed of trust itself is a contract between the parties, and the purpose of the statute in question is merely to enforce the contract which the parties have entered into and to enforce it in the particular way which the lawmakers deemed wise and best. Inasmuch as the advertisement in the instant case was less than that contracted for and provided by the *95trust deed itself, we are constrained to hold that the sale by the trustee was void; and his deed would convey no title. This being true, the court should not compel the purchaser to buy a lawsuit or to accept an invalid deed.
“Through there is a presumption in favor of the validity and regularity of a completed sale, the purchaser is affected with th'e consequences, and therefore with the knowledge of all material irregularities incident to the exercise of the power.” 28 Am. & Eng. Enc. of Law (3d Ed.) p. 820. •
Counsel for appellee contetod.that this question is. raised for the first time on'appeal and on that account the court should not reverse this case. The bill, however, recites, “said advertisement being made according to law for three consecutive weeks, in the Greenville Times,” and the trustee’s deed exhibited with the bill likewise recites, “after advertising the hereinafter described property for three consecutive weeks,” and the proof removes all doubt as to the period of advertisement and shows affirmatively twenty-two days’ notice. Complainant is therefore in the attitude of showing by his own pleadings, exhibits, and proof, the'fatal irregularity complained of.
Let the decree of the court below be reversed, and the bill dismissed.
Reversed.