Burks, J.,
delivered the.opinion of the court.
This is a suit for partition of a, house and lot on Charlotte street, in the city of Norfolk, and incidentally to' remove a cloud on the title. The defendant demurred to the complainant’s bill and the trial court sustained the demurrer, and the complainant appealed.
The plaintiff is an infant claiming an undivided two-thirds interest in the house and lot, the whole of which is claimed by the defendant by virtue of a, purchase at a trustee’s sale. The deed of trust under which the defendant claims title was placed on the property of the infant by virtue of proceedings in a chancery suit pending in the Circuit Court of the city of Norfolk. The infant claims that the proceedings in that suit did not conform to the statute in such case made and provided, and that consequently he was never divested of his title thereto. This is the principal question we are called upon to decide.
Henry Parker, the father of the said infant, devised and bequeathed one-third of his real and personal estate to his wife, the mother of said infant, and the other two-thirds *437thereof to the said infant, subject to the payment of his debts and two legacies, amounting to $250, and provided that in the event of the death of either, his entire estate should go to the survivor of them. His wife was appointed executrix of the will and qualified as such. She also qualified as guardian of her child, and infant about five years of age. About four years after the death of her husband she filed a bill in the Circuit Court of the city of Norfolk, in her own right and as guardian of her infant son, a copy of which appears in the statement prefixed to this opinion. In this bill it is stated, amongst other things, that the personal estate of her husband was not sufficient to pay his debts and the legacies aforesaid; that he left two pieces of real estate, situate in the city, one of which was used as place of residence for herself and her son, and that the other had become in such bad repair and condition that no tenant therefor could be obtained and consequently it was vacant and unoccupied; that she had no means of subsistence except the rent to be derived from the vacant property and a small pension of $12 per month, that she had no money with which to make repairs and ha,d to borrow money and incur debts to obtain the necessaries of life; that she did not think it necessary to sell any of the real estate, but that if a sufficient sum of money could be borrowed on the vacant property to put it in repair and a tenant could be obtained therefor, the revenue therefrom would be sufficient to maintain her and her ward, but if the property could not be encumbered she prayed that it might be sold and the proceeds be distributed and invested under the order of the court. The infant was the sole defendant to this bill, and answered by a guardian ad litem, duly appointed, who also answered as such guardian ad litem. Such proceedings were had on this bill that a loan of $900 was authorized on the property, to be secured by deed of trust to be executed on behalf of the infant by a commissioner *438of the court. The loan was obtained and the deed of trust executed by said commissioner and by Mrs. Parker. When the loan became due it was not paid, the property was sold under the deed of trust, and the appellee became the purchaser thereof at the price of $2,025. This suit is hereinafter referred to as the mortgage suit.
It is claimed on behalf of the infant that the above men- . tioned suit was a suit to sell or to mortgage the lands of an infant, and in either event the proceedings are void, not merely voidable, because the bill did not “state plainly all the estate, real and personal, belonging to the infant,” and further because it did not make parties, “those who would be his (the infant’s) heirs were he dead.” The property having come from the father, it was claimed that, if the infant were dead, his heirs on the father’s' side would inherit it,.and they were not made parties.
Before the loan was made the case was referred to a master commissioner to make the following enquiries:
1. Of what estate, real and personal, the infant defendant, Henry Parker, is-possessed or entitled, where such estate is situated, what its fee-simple and annual value, and what liens, if any, there are against the same.
2. Whether the interest of the said infant defendant will be promoted- by encumbering or selling the real estate in. the bill mentioned, or any part thereof, and if encumbered what amount should be borrowed on the same, and how the proceeds should be distributed or invested if encumbered or sold.
3. Whether the rights of any person will be violated by such encumbrance or sale and investment.
4. Who would be the heirs at law or distributees of said infant defendant if he were dead, and whether all such persons are properly before the court in the cause.
In response to the enquiries, the commissioner reported *439as follows: Under No. 1 he simply states what the infant took under his father’s will, and gave the fee simple and annual rental value of the two lots. He does not state expressly that this is all of the estate, real and personal, belonging to the infant. He says there are no liens on the estate, but states an account showing the estate indebted to the plaintiff as executrix in the sum of $338.48 for debts, legacies, taxes, etc., paid by her. Under enquiry No. 2 he reports that it would be to the best interest of the infant to encumber the vacant property aforesaid, and fixes the amount of the loan to be obtained at $900, composed of $233.45 for repairs, $175.00 for unpaid taxes, $338.48 due executrix, and $153.07 for expenses. Under enquiry No. 3 he reports that the interest of no person will be violated by the encumbrance, but on the contrary, the interests of Mrs. Parker and her son will be promoted thereby. Under enquiry No. 4 he reports that, in accordance with the will of Henry Parker, in the event of the death of the infant, his interest in the estate of his father passes to his mother, Mrs. Virginia P. Parker, who is a party to the suit.
[1] In a suit to sell or mortgage the lands of an infant, he is considered as objecting at every point, and no demurrer is needed on his part to protect him from defective allegations of the bill. Substantial compliance with the procedure prescribed by the statute is essential to the jurisdiction of the court to enter any decree in the cause.
In Coleman v. Va. Stave Co., 112 Va. 61, 70 S. E. 545, it is said: “In reaching the conclusion that the proceedings in the original suit were invalid, we have not been unmindful of the fact that sound policy requires that judicial sales should be sustained as far as possible consistent with the rights of others, and that innocent purchasers are favorites of the law. But infants are also the favorites of courts of chancery. They are not only incapable of conveying their real estate, but are incompetent to consent to any of *440the proceedings provided by law for its disposition. In such a proceeding as the one involved in this case, they stand in the position of hostile parties to it and are treated as objecting to every step taken therein.”
In Brenham v. Smith, 120 Va. 30, 90 S. E. 657, it is said:
“It seems to be settled law that when a new jurisdiction is created by statute and the mode of acquiring and exercising that jurisdiction by the court upon which it is conferred is prescribed by statute, a substantial compliance therewith, at least, is essential, otherwise the proceedings will be a nullity.” Again, it is- said in the same case: “The mandatory requirements of the statute providing for the sale of infants’ lands were all manifestly thought by the legislature to be essential to the protection of infants; they have been scrupulously and sacredly observed and enforced by the courts; and it is, as we have seen, settled law in Virginia that a substantial compliance with them is just as indispensable as process is against a,n adult in an ordinary suit. Indeed, the procedure in such cases is process itself.” Again, it is said: “As the law now stands in Virginia, an affirmance of the decree appealed from would as clearly be a taking of property without due process of law as the enforcement of a judgment in ejectment rendered without process on, or appearance by the defendant.” Again, it is said: “The legislature has wisely surrounded such sales with all reasonable safeguards, and the courts have been astute to give effect to this protective legislation.”
In Watkins v. Ford, 123 Va. 268, 96 S. E. 193, it is said: “Nowhere has the property of infants been more carefully guarded against injudicious sales than in this State. The legislature has wisely surrounded such sales with all rear sonable safeguards, and the courts have been astute to give effect.to this protective legislation. The case of Coleman v. Stave Co., 112 Va. 61, 70 S. E. 545, affords a conspicuous illustration of the rule of decision in that class of cases.” -
*441[2] The bill does not state that the interest of the infant in two houses and lots therein mentioned is all of the estate, real and personal, belonging to the infant, but that is the fair inference, and this inference is confirmed by the finding of the commissioner to whom the cause was referred, which finding was confirmed without objection. Upon the authority of Durrett v. Davis, 24 Gratt. (65 Va.) 302, this was sufficient.
[3, 4] The clause of Henry Parker’s will by which he declares that “in the event of the death of either my son or my wife my entire estate shall go to the survivor of them,” referred to the death of the testator, and upon his death, both of them surviving, they took fee simple estates in the property devised to them respectively. Armistead v. Hart, 97 Va. 316, 33 S. E. 616. Upon the death of the infant, therefore, his property descended to his paternal heirs, and these should have been made parties to the suit, but were not.
[5] Counsel for the appellee insist that if a court of equity had jurisdiction on any ground, its decree was not void, but at most only voidable, and not subject to collateral attack; and that the instant suit is a collateral attack on the decrees by which the deed of trust was put upon the infant’s lands, and they state several grounds upon which they claim that a court of equity had jurisdiction of the cause. The suit was brought by Mrs. Parker in her own right, and also as guardian of her infant child, and it is insisted that she had the right' to sue as creditor of her husband’s estate, having paid his debts and legacies, but the bill makes no charge that she is a creditor and does not show that at the time it was filed, she had paid any debt or legacy of her husband. On the contrary, the bill alleges that “she has no income out of which she can pay said debts,” and the report of the commissioner subsequently filed does not show when the debts and legacies were paid. There is nothing, in the bill to show jurisdiction on this ground.
*442[6, 7] It is further insisted that the court had jurisdiction of the case to administer the real assets of Henry Parker’s estate. Here again there a,re no allegations in the bill upon which the court could found jurisdiction. There are no allegations that the complainant was a creditor, she was not granted any powers as executrix, and did not sue as such, or make any allegations in her bill that could have justified the court in taking jurisdiction of a suit to administer the real assets of the decedent. A similar answer may be made to the suggestion that the suit could have been maintained as a suit for contribution from the infant as her' co-tenant and devisee. There was no allegation in the bill to show a right to contribution, or for what contribution could be demanded, or even a desire for it, if the right existed. It was also suggested that the suit .might, have been maintained as a suit for partition, but it was-very properly conceded on the argument that no deed of trust could have been placed on the property on behalf of the infant in a suit for partition.
[8] It has been earnestly pressed upon us that section 2616 of the Code (1904) relates only to sales or mortgages of the property of persons under disability for the purposes of reinvestment or for maintenance and education, and does not apply to mortgages for the purpose of preservation or repairs. For the latter purposes, it is insisted that courts of equity have an inherent jurisdiction, which has not been taken away by said section 2616. Authorities have been cited from other jurisdictions to show the existence of such inherent jurisdiction. If it be conceded that such a power exists in courts of equity, the manner of its exercise is regulated and controlled by section 2609 of the Code (1904), section 5326, Code 1919. It is there provided, amongst other things, that circuit and corporation courts in chancery may make any order for the management, preservation and investment of the estate of an infant, and *443the method of obtaining an order for such preservation is plainly pointed out to be the same as under said section 2616. Whether the jurisdiction to mortgage the estate of an infant for repairs and preservation be regarded as inherent or conferred by statute, in this State it can only be exercised in the manner pointed out by the statute. Code 1904, sections 2609, 2616; Code 1919, sections 5326, 5335.
[9, 10] It is very plain from reading the pleadings and the proceedings thereon, in the mortgage suit, that it was the purpose of the parties to proceed under section 2616 of the Code (1904), and that they endeavored to conform thereto, but these proceedings, as we have pointed out, were substantially defective, and for that reason the mortgage made in pursuance thereof and the sale thereunder are void. The bill in the mortgage suit charges that “if the said infant were dead, your complainant would be his sole heir and distributee,” and the commissioner to whom the cause was referred reported that “in accordance with the terms of the last will and testament of said Henry Parker, deceased, that in the event of the death of said infant defendant, his interest in the estate of his father passes to his mother, the said Virginia P. Parker, who is a party to this suit and properly before the court.” This report was confirmed by the court. But upon our construction of the will of Henry Parker, his infant son took a fee simple estate in the property devised to him by his father, and consequently, under section 2556 of the Code (1904), upon his death in infancy his property would descend to his paternal kindred, who were not made parties to the suit. The allegation of the bill in the instant case, which must be accepted as true on the demurrer thereto, is “nor were all the persons who would have been heirs of said infant if he were dead made parties to said suit; nor were any persons who would have been his heirs on his father’s side made parties to said suit.” Under our decisions, some of *444which are hereinbefore reviewed, the presence of the necessary parties required by section 2616 of the Code (1904), in a suit of this nature, is jurisdictional, and a decree rendered in their absence is void as to infants whose interests are affected thereby.
We shall next consider what relief should be granted to the complainant, an infant, in the present suit. It is said in Clark on Contracts (2d ed.), p. 172: “As we have just stated, when a person avoids a contract made by him during his minority, he must, as a rule,'return the consideration he has received. As to whether or not he must do so as a condition precedent to disaffirmance, or whether the other party must be left to his action to recover the consideration after disaffirmance, and as to whether the consideration must be returned where it has been wasted or otherwise disposed of, the decisions are conflicting.
“(a) Where the contract is executory on the part of the infant, and he has not ratified it by his conduct, as explained above, it cannot, according to the weight of authority, be enforced against him, even though he retains the consideration received by him in kind. He need not return the consideration as a condition precedent to repudiating the contract and pleading his infancy in an action brought against him to enforce it. When he repudiates his contract, however, he no longer has any right to the consideration he has received, and a,t least, if he has it, the other party may .maintain an action to recover it. According to the weight of authority, if he has disposed of the consideration so that he cannot return it in kind, he cannot be held liable for it.”
[11, 12] This view was long ago taken by this court in Mustard v. Wohlford, 15 Gratt. (56 Va.) 329,. 76 Am. Dec. 209. These authorities are not directly in point on the question under consideration, but are pertinent to the question of the relief to which the parties are entitled. The *445infant complainant in the present suit has come into a court of equity, asking its aid and assistance-to have the deed of trust and the deed made to the appellee in pursuance of the sale made thereunder “declared void and of no effect as to said two-thirds of your orator,” and hence removed as a cloud on his title. Where the situation is such that equity can be done between the parties, the infancy of a complainant does not exclude him from the operation of the maxim that he who asks equity must do equity. It appears from the record that the property in controversy has greatly increased in market value, so that the court has under its control the means of adjusting the equities of the parties. The deed of trust and the sale thereunder so far as they affect the interest of the infant complainant, should be set aside and annulled, and his interest in the property should be charged in favor of the appellee with two-thirds of the purchase money paid by the appellee therefor, with legal interest thereon from the date of its payment by the appellee. The appellee should also have credit for two-thirds of the enhanced market value of the property by reason of any permanent improvements placed thereon by him since he became the purchaser thereof, and two-thirds of all sums paid by him for insurance premiums and taxes on the property since he became such purchaser, with legal interest on the sums paid for such premiums and taxes from the dates of their respective payments, and he should be charged with two-thirds of the rents a,nd profits of said property since he became the purchaser thereof, with legal interest on such sums from the respective dates on which they were received.
The decree of the circuit court will, therefore, be reversed and the cause remanded to said court, with direction to the circuit court to overrule defendant’s demurrer to the complainant’s bill, and to permit the defendant to answer said bill, to set aside and annul the deed of trust aforesaid, *446and the sale thereunder and the deed to the defendant, in so far as they affect the interest of the appellant, and unless some good cause to the contrary be set up by the defendant’s answer when filed, and established by the evidence, to ascertain the state of accounts between the appellant and the appellee upon the basis aforesaid, and when ascertained, to charge the interest of the debtor in the property in controversy with a lien in favor of the creditor for the balance found due, and take such other steps as may be necessary to effect a partition of said property in accordance with the prayer of the complainant’s bill, and to assure to the purchaser, in case of a sale, a title to the property unaffected, so far as the interest of the, complainant therein is concerned by said deed of trust and the deed to the appellee made in pursuance of the sale under said deed of trust.
Reversed.