
170 Va. 458 (1938)
JOHN R. BUCHANAN
v.
RUTH LESTER BUCHANAN.
Supreme Court of Virginia.
March 10, 1938.
Walter H. Robertson, Thomas B. Gay and Lewis F. Powell, Jr., for the plaintiff in error.
John S. Barbour, for the defendant in error.
Present, All the Justices.
1.  JUDGMENTS AND DECREES -- Collateral Attack -- Successful Attack Must Show Judgments to Be Void. -- A successful collateral attack made upon a judgment of a court of general jurisdiction must show the judgment to be void, not merely voidable.
2.  HABEAS CORPUS -- Primary Object. -- The primary object of habeas corpus is to determine the legality of the restraint under which a person is held.
3.  HABEAS CORPUS -- Custody of Child -- Primary Object. -- As applied to infants, the primary object of habeas corpus is to determine in whose custody the best interests of the infants will probably be advanced.
4.  PARENT AND CHILD -- Custody of Child -- Natural Rights of Parents Entitled to Consideration. -- In determining the custody of infants, the natural rights of the parents are entitled to due consideration.
5.  HABEAS CORPUS -- Aim Is Swift and Summary Justice. -- The aim of habeas corpus is a justice that is swift and summary.
6.  PARENT AND CHILD -- Custody of Child -- Determination of Collateral Issues Not to Be Attempted. -- The speedy determination of the illegality of restraint or the custody of infants should not be hindered or delayed by attempting in one proceeding to determine other collateral issues.
7.  HABEAS CORPUS -- To Determine Guardianship Contest. -- A contest for guardianship cannot be properly determined upon a writ of habeas corpus.
8.  HABEAS CORPUS -- Judgment -- Order Must Be Made for Custody of Person Not of Age of Discretion. -- While the proper office of the writ of habeas corpus is to release from illegal restraint, and, where the party is of years of discretion and sui juris, nothing more is done than to discharge him; yet, if he be not of an age to determine for himself, the court or judge must decide for him, and make an order for his being placed in the proper custody.
9.  HABEAS CORPUS -- Only Matters Necessarily Connected with Detention or Imprisonment Considered. -- Only those matters which have a necessary connection with the question of the validity of the detention or imprisonment will be considered in a habeas corpus proceeding, and all other matters will be uniformly rejected.
10.  HABEAS CORPUS -- Judgment -- Noney Award for Maintenance of Wife and Children Void. -- In a habeas corpus proceeding to determine the custody of an infant, the single issue is the proper custody of the infant, and obedience to the judgment is enforced by seizure and restraint of the person, while obedience to a judgment or decree for money, in the absence of statute, is imposed by seizure of defendant's property, so that a money award for the future maintenance of a wife and children given in a habeas corpus proceeding is void.
11.  HABEAS CORPUS -- Judgment -- Order Making Money Award -- Consent of Parties -- Case at Bar. -- In the instant case, after a husband and wife had entered into a written contract of separation, the husband obtained a divorce in a foreign state.  Thereafter he filed a petition for a writ of habeas corpus alleging that the wife was not a suitable person to have custody of the children.  The lower court entered an order by consent of the parties which made little change in the provisions of the separation contract as to the custody of the children, but substantially decreased the monthly payments to be made.  From an order of the trial court holding the husband in contempt for failure to comply with such order the husband appealed.
Held:  That the order modifying the agreement of the parties regarding their property rights and making a money award, entered in a habeas corpus proceeding, was not pertinent to the allegations, prayer or issue presented, and hence, as a judgment settling property rights in a habeas corpus proceeding, the order, to the extent indicated, was void, but, having been entered by consent, it was evidence of binding contractual obligations.
12.  PARENT AND CHILD -- Duty of Parent to Support Child -- Child's Right to Maintenance Is Perfect Right. -- The duty of maintenance on the part of fathers in respect to their infant children is a principle of natural law, the right to which, on the part of such children, is a perfect right.
13.  PARENT AND CHILD -- Duty of Parent to Support Child -- Similar to Husband's Obligation to Wife. -- The obligation of a father to support his minor children is similar to a husband's obligation to support a blameless wife.
14.  PARENT AND CHILD -- Actions by Child against Parent Not Encouraged. -- Actions or suits by or in behalf of a child against its parent should not be encouraged.
15.  PARENT AND CHILD -- Duty of Parent to Support Child -- Common-Law Action by Child to Compel Payments for Future Support and Education -- Case at Bar. -- The instant case was an independent action at law, instituted by minor children and a divorced wife to compel the husband and father to pay out of his income a definite sum each month for the future maintenance and education of the children.  The lower court ruled that the divorced husband should pay a certain sum per month to the divorced wife, to be held and applied by her at her discretion in providing proper tuition and all school expenses incident thereto for her two sons at such schools as she might select.
Held:  That the judgment of the court on its common-law side, so far as it attempted, in this action by minors, to compel their father to provide them an income out of his estate for their future support and education, was void.
16.  PARENT AND CHILD -- Custody of Child -- Bill in Equity Usual Remedy to Try Right to Custody. -- A bill in equity is the most direct, usual, and eligible remedy, in general, to try the right of the parent to the custody of the child.
17.  GUARDIAN AND WARD -- Parent and Child -- Jurisdiction of Equity. -- Under section 5326 of the Code of 1936, the court of chancery, as representing the parental and protecting power of the Commonwealth, has jurisdiction to determine controversies concerning the guardianship of a minor; to make orders for his support, if any property capable of being so applied be within the reach of the court; and in extreme cases even to control the right of a father to the custody of his child.
18.  PARENT AND CHILD -- Duty of Parent to Support Child -- Jurisdiction of Equity -- Independent Action at Law by Child without Property -- Case at Bar. -- The instant case was an independent action at law, instituted by minor children and a divorced wife to compel the husband and father to pay out of his income a definite sum each month for the future maintenance and education of the children.  On appeal, the mother contended that the proceedings should be regarded as invoking the parental and protecting power of the Commonwealth in a chancery court to determine controversies concerning minors, their persons and property.
Held:  That there was no merit in this contention, since the minors had no property subject to the control of the court and the pleading did not purport to be a bill in equity.
19.  DIVORCE -- Modification of Decree as to Custody and Maintenance of Children -- Jurisdiction of Independent Action by Child Not Given by Section 5111 of the Code of 1936 -- Case at Bar. -- The instant case was an independent action at law, instituted by minor children and a divorced wife to compel the husband and father to pay out of his income a definite sum each month for the future maintenance and education of the children.  On appeal, the mother contended that a court of equity had power to enforce the common-law obligation of the father as to future support, by virtue of section 5111 of the Code of 1936, authorizing a court of equity, in a divorce suit, on the petition of either party, after final decree, to revise and alter such decree concerning the care, custody and maintenance of the children.
Held:  That there was no merit in this contention for the reasons that the suit was not one for divorce, so that there was no decree to be revised, and the pleading did not purport to be a bill in equity.
20.  JURISDICTION -- Jurisdiction of Subject Matter Not Given by Consent. -- Consent does not give jurisdiction of the subject-matter.
21.  PARENT AND CHILD -- Duty of Parent to Support Child -- Independent Action at Law by Child -- Consent of Father's Attorney to Order Fixing Monthly Payments -- Case at Bar. -- In the instant case, an independent action at law instituted by minor children and a divorced wife to compel the husband and father to pay out of his income a definite sum each month for the future maintenance and education of the children, the court ordered the father to pay to the divorced wife $375 per month, in addition to a like sum previously ordered to be paid in a habeas corpus proceeding.  It was contended that the award was made at the suggestion of the father's attorney, but it appeared that the suggestion made was that the mother be paid $200 per month, and that the attorney filed objections to the entry of the order fixing the monthly payments at $750.
Held:  That there was no consent to this order.
22.  COURTS -- Powers -- Must Act Judicially. -- A court, whether acting under its common-law powers or under its chancery powers, must act judicially in all cases, and cannot transcend this power.
23.  HABEAS CORPUS -- Equitable Relief Cannot Be Granted. -- The distinctions between common-law and chancery jurisdiction have not been modified to the extent that equitable relief can be granted, even with the consent of the parties, in a habeas corpus proceeding -- a proceeding confined to investigating the validity of restraint of the person, or custody of infants.
24.  JURISDICTION -- Retention of Jurisdiction Once Acquired -- Conclusiveness of Judgment or Decree upon Collateral Attack. -- The doctrine that where a court has once acquired jurisdiction it has a right to decide every question which arises in the cause, and its judgment or decree, however erroneous, cannot be collaterally assailed, is only correct when the court proceeds according to the established modes governing the class to which the case belongs, and does not transcend in the extent and character of its judgment or decree the law or statute which is applicable to it.
25.  PARENT AND CHILD -- Custody of Child -- Contract between Parents. -- A contract between a mother and father is not binding upon a court, as to the custody of infants, nor will the court permit a parent, under any or all circumstances, to transfer his common-law obligations due his children.
26.  PARENT AND CHILD -- Duty of Parent to Support Child -- Where Father Has Forfeited Right to Participate in Supervision of Education. -- If a father, by his conduct, has forfeited the right to participate in the supervision of the education of his children, the mother may defray the expenses of their maintenance and education, and recover for all moneys so expended.
27.  PARENT AND CHILD -- Duty of Parent to Support Child -- Award for Future Maintenance in Action at Law by Mother and Children against Father -- Case at Bar. -- In the instant case, an independent action at law, instituted by minor children and a divorced wife to compel the husband and father to pay a definite sum each month for the future maintenance and education of the children, the lower court ordered the father to pay a certain sum per month to the divorced wife, to be held and applied by her at her discretion in providing proper tuition and all school expenses incident thereto for her two sons at such schools as she might select.
Held:  That the trial court had jurisdiction upon the petition filed by the mother, even if improper parties were joined, to determine the custody of the children, but it had no jurisdiction or power, in the procedure adopted, to determine the question of compensation for the future maintenance and education of the two boys.
Error to a judgment of the Circuit Court of Fauquier county.  Hon. J. R. H. Alexander, judge presiding. The opinion states the case.
HUDGINS
HUDGINS, J., delivered the opinion of the court.
The first major question to be determined in this case is whether a money award, for the future maintenance of a wife, divorced in another state, and children, rendered in a habeas corpus proceeding, is voidable or void.
John R. Buchanan and Ruth Lester were married on January 15, 1916.  The three children, a daughter and two sons, born to this union, were, on September 29, 1933, sixteen, fourteen, and eleven years of age, respectively.  The *463  husband and wife separated, and on May 18, 1931, entered into a written contract settling their financial affairs and making provision for the custody, maintenance, and education of the children.  Within two months after this agreement was executed, John R. Buchanan instituted divorce proceedings in the second judicial district court of Nevada.  Ruth L. Buchanan filed an answer denying the allegations of the complaint, but offered no evidence to support the allegations in her answer.  The Nevada court, on July 27, 1931, entered a decree approving and ratifying the contract of separation, and granting John R. Buchanan an absolute divorce on the ground that the wife had treated the plaintiff with extreme cruelty.
John R. Buchanan, on June 27, 1933, filed, in the Circuit Court of Fauquier county, a petition for a writ of habeas corpus, alleging, among other things, that his divorced wife, Ruth L. Buchanan, was not a suitable person to have the custody of her minor children; that pursuant to his promise in the contract of separation he had paid her $1,500 a month for the upkeep of "Leny Manor," their country estate in Fauquier county, as a home for herself and children; and that she had failed to expend these monthly payments according to the provisions of the contract.  He further alleged that it was impossible for him, on account of his contract with his wife, to maintain a home for his children at "Leny Manor." He offered to secure other property in Fauquier or Loudoun counties for this purpose.
To this petition, respondent filed an answer attacking the decree of the divorce obtained in Reno, Nevada, admitting the execution of the contract of separation, but denying that any part of its terms had been broken or that she was an improper person to have the custody of her minor children.
After issue was thus joined in the habeas corpus proceedings, the court on September 29, 1933, by consent of the parties, entered an order making very little change in the provisions of the contract of separation so far as the custody of the children was concerned, but making substantial changes in the property rights of the parties.  The monthly *464 allowance of $1,500 was reduced to $375 per month, and ordered to be paid Ruth L. Buchanan "on the first of each month towards the establishment of a home suitable for herself and children other than the said 'Leny Manor.'"
John R. Buchanan now seeks a review by this court of a subsequent order of the trial court holding him in contempt for failure to comply with that part of the order of September 29, 1933, directing him to pay to Ruth L. Buchanan the sum of $375 a month.
  A successful collateral attack made upon a judgment of a court of general jurisdiction must show the judgment to be void, not merely voidable.
[2-6]  The primary object of habeas corpus is to determine the legality of the restraint under which a person is held.  As applied to infants, the primary object is to determine in whose custody the best interests of the infants will probably be advanced.  In determining such custody, the natural rights of the parents are entitled to due consideration.  "By immemorial tradition the aim of habeas corpus is a justice that is swift and summary."  People ex rel. McCanliss McCanliss, 255 N.Y. 456, 175 N.E. 129, 82 A.L.R. 1141.  This speedy determination of the illegality of restraint, or the custody of infants, should not be hindered or delayed by attempting in one proceeding to determine other collateral issues.
In Armstrong  Stone and Wife, 9 Gratt. (50 Va.) 102, the court said:  "It is further argued that it is not the function of a writ of habeas corpus to try rights of property or settle questions of guardianship, but simply to release from improper confinement; and if it appear there is no improper restraint upon the minor, the court should not interfere."
  "It is true that a contest for the guardianship could not properly be determined upon a writ of habeas corpus.  The law has prescribed another form for settling such controversies.  * * *"
  "Whilst, therefore, it is undoubtedly true that the proper office of the writ is to release from illegal restraint, and, where the party is of years of discretion and sui juris, *465 nothing more is done than to discharge him; yet, if he be not of an age to determine for himself, the court or judge must decide for him, and make an order for his being placed in the proper custody." (Italics supplied.)  See Merritt  Swimley, 82 Va. 433, 3 Am.St.rep. 115; Coffee Black, 82 Va. 567; Slater  Slater, 90 Va. 845, 20 S.E. 780; Taylor  Taylor, 103 Va. 750, 50 S.E. 273; Wyatt  Gleason, 117 Va. 196, 83 S.E. 1069, and Parrish Parrish, 116 Va. 476, 82 S.E. 119, L.R.A. 1915A, 576.
This court has consistently held the issue in a habeas corpus proceeding to the narrow limits stated above.  In Hayes  Strauss, 151 Va. 136, 142, 144 S.E. 432, 434, it appeared that a habeas corpus proceeding had been instituted to determine the custody of an infant.  The lower court revoked the appointment of a guardian and appointed a new guardian for the infant.  We held this error. Mr. Justice Holt, speaking for the court, said:  "The court did go on to revoke the guardianship of Charlotte Hayes, and to appoint in her place and stead Steve Strauss.  Of course, the court always has the power in a proper case to remove one guardian and appoint another, but this cannot be done in habeas corpus proceedings (Mathews  Wade (2 W.Va. 464) supra), and so the order in this case in this particular was erroneous."
  In Foulke  People, 4 Colo.App. 519, 526, 36 P. 640, 642, this is said: "The rule as stated in Church on Habeas Corpus (section 170), appears to be concise and definite and in harmony with all leading English and American decisions.  It is 'that only those matters which have a necessary connection with the question of the validity of the detention or imprisonment will be considered; and all other matters will be uniformly rejected.'"
"It will therefore be seen that the proceeding is confined in very narrow limits, and cannot be extended to the adjudication of claims or money demands and unsettled accounts between the parties; the only jurisdiction of the court was to determine whether the father or aunt had the better right to the child, and decree it to such custody."  *466 See also, People  Porter, 1 Duer (8 N.Y.Super.Ct.) 709; State  Baird, 18 N.J.Eq. 194; State  Banks, 25 Ind. 495; People  Wilcox, 22 Barb.(N.Y.) 178.  See Ferguson  Ferguson, 36 Mo. 197; 29 C.J. 109; Lowrey  Lowrey, 108 Ga. 766, 33 S.E. 421.
The precise question was decided adversely to the contention of defendant in error in People ex rel. Prior  Prior, 112 Misc. 208, 182 N.Y.S. 577.  The facts in that case appear to be that, in a habeas corpus proceeding, the custody of a minor child had been taken from the father, and he was ordered to make weekly payments toward its support.  He failed to make the payments and was cited for contempt.  In disposing of the case, the court said:  "One of the answers of the husband to the motion is that the court had no jurisdiction in this proceeding to make an order providing for the payment by him of a sum of money for the maintenance and support of his child, even though the father consented to the order.  * * * Since the court has no power under the statute to make a money provision, the question arises as to whether or not there is an inherent power in the court to make such a provision.  * * * Aside from statutory enactment, however, the court surely has no power under a writ of habeas corpus to make a money award.  Attention has not been called to a case in this state where a court of law or equity has undertaken to make a money provision for the support of a child, except in matrimonial actions.  * * * I conclude, therefore, that there is no inherent power in the court to make any such money provision."
In People ex rel. Klee  Klee, 202 App.Div. 592, 195 N.Y.S. 778, 780, this is said:  "The only question in dispute here is whether the court at Special Term had jurisdiction to compel the father, from whose custody the child was taken, to pay a fixed sum per week for the separate maintenance and education of the child.  Neither before nor since the adoption of the statute, in any contested case of record, has the court assumed jurisdiction as a condition, regulation, or restriction in disposing of the custody of *467 children, to provide in the order for their maintenance and support out of the property of the parent.  It may be, as Lazansky, J., says in People ex rel. Prior  Prior, 112 Misc. 208, 182 N.Y.S. 577, that some courts have been accustomed to grant such orders ex parte and they may have been acquiesced in, but it does not follow that the court had jurisdiction.  The failure of the courts to exercise such jurisdiction during a period of more than a century is strong evidence that it does not exist."  See In re Vanderbilt, 153 Misc. 884, 276 N.Y.S. 745.
[10, 11]  The single issue in this class of actions is the proper custody of the infant.  Obedience to a judgment rendered on such an issue is enforced by seizure and restraint of the person.  Obedience to a judgment or decree for money, in the absence of statute conferring other powers upon the court, is now imposed by seizure of defendant's property.  The order modifying the agreement of the parties regarding their property rights and making a money award, entered in a habeas corpus proceeding, was not pertinent to the allegations, prayer or issue presented.  Hence, as a judgment settling property rights in a habeas corpus proceeding, the order to the extent indicated, is void, but, having been entered by consent, it is evidence of binding contractual obligations. Appellees, without statutory aid, are attempting to enforce a voluntary settlement of property by seizure and restraint of the person.  See 12 R.C.L. 1184, 1215, 1238; 84 A.L.R., note 813.
The second major question presented is whether, in an independent action at law, instituted by minor children and a divorced wife, the court has jurisdiction or power to compel a father to pay out of his income a definite sum each month for the future support, maintenance, and education of his minor children.
The consent order of September 29, 1933, entered in the habeas corpus proceeding, directed the clerk to place the case on the inactive docket.  On November 26, 1934, Ruth L. Buchanan in her own right and as next friend of the two minor sons, moved the court to put the case on its pending *468 docket, and, by leave, filed a petition setting forth all the former proceedings between the parties, the contract of May 18, 1931, as modified by the consent order, and alleged that John R. Buchanan had refused to cooperate with the mother or the sons in selecting a boarding school suitable to the station in life of their children; that the mother and sons had selected certain schools for the sons to attend; that the father desired the sons to attend other schools; that the sons and mother had been embarrassed by the father's failure to pay promptly bills for their tuition and board, and in certain instances had failed to pay the bills at all; that the father had since remarried, and that he and his second wife had alienated the affections of the children from their mother, and that he had refused to discuss with the mother the needs of the minor sons as to clothing, education or recreation.  The petition further alleged that his annual income was in excess of $60,000, and that he was not a fit and proper person to have the custody and control of his sons.  The prayer of the petitioners was to ascertain the annual income of John R. Buchanan during the past five years; that an order be entered, "making more flexible provision for the custody of said children during their vacations, directions by your honor for their proper education and training, and that said John R. Buchanan be required to adopt a course so as to secure the prompt payment by him of all proper obligations and expenses incident to the proper education, training, clothing and maintenance of said children according to their station in life, present and prospective."
John R. Buchanan appeared by counsel, waived process, filed an answer and cross-complaint denying the pertinent allegations of the petition, and making numerous averments as to his financial status, and for the second time alleged that Ruth L. Buchanan was unfit to have the custody of the minor children, and asked to be relieved of making any other monthly payments to her.
The case was heard on the pleadings, the depositions of witnesses, and testimony taken ore tenus.  After the court *469 had examined each child separately and apart from the parents, an order was entered on June 24, 1935, declaring:  (1)  That neither parent was unfit to have the care and custody of their minor children; (2) that inasmuch as the two sons had expressed a preference to live with their mother, their custody was awarded to her, and for the same reason the custody of the daughter was awarded to the father; (3) "That the best interest of all parties, including said children, will be best promoted by requiring a stated sum to be paid Ruth Lester Buchanan by said John R. Buchanan, to be expended by her at her discretion in the education of the two boys committed to her custody;" and (4) that John R. Buchanan pay to the said Ruth L. Buchanan an additional sum of $375 per month "to be held and applied by her at her discretion in providing proper tuition and all scholastic expenses incident thereto, for her two sons at such schools as she may select," and for the purchase of suitable clothing.
On the 18th of December, 1935, John R. Buchanan asked leave to file a bill of review on two grounds -- errors apparent on the face of the record, and newly discovered evidence.  Ruth L. Buchanan, in her own right, and as next friend of her two sons, made objection to the filing of this bill of review.  After some delay the court declined leave to file the bill and assigned the following reasons for the ruling:
"1.  That this proceeding was an action at law, having had its inception in the filing by the petitioner of a Writ of Habeas Corpus;"
"2.  That in the entry of the order based upon the original writ, the Court properly had authority to retain the action on its docket for such further proceedings as might come to be proper;"
"3.  That the Court had jurisdiction to enter the order for custody, maintenance and education of the infant children of the parties especially since the entry of such an order was suggested by counsel for John R. Buchanan in his argument.  *470 "
"4.  That this proceeding being an action at law, petitioner's Bill of Review is not applicable, and leave to file same should be denied."
Exceptions were duly taken to the ruling of the court in its refusal to entertain the bill of review, but no appeal to this court was perfected.
A rule was issued against John R. Buchanan for failure to pay his divorced wife $750 per month, $375 as directed in the order of September 29, 1933, and an additional $375 as directed in the order of June 24, 1935.  In answer to this rule, he made defenses which were overruled, and later assigned the same defenses, and the refusal of the court to sustain them, as errors in the petition to this court.
The petition filed by the minors and their mother is not an action at law to recover for necessaries furnished by a third party to a father's minor children based on the common-law obligation of the father.  See Moreland  Moreland, 108 Va. 93, 60 S.E. 730; Newman  McComb, 112 Va. 408, 71 S.E. 624.
This is not an action at law to recover damages for a breach of contract. The petition contains no allegation that John R. Buchanan failed to pay Ruth L. Buchanan the sum of $375 per month "for the establishment of a home suitable for herself and the children."  The allegations in the petition do not conform to allegations of a bill in equity by a divorced wife to compel specific performance, by a former husband, of a contract to pay the wife an annuity, as was the case in Eschner  Eschner, 146 Va. 417, 131 S.E. 800.  See Moore Crutchfield, 136 Va. 20, 24, 32, 116 S.E. 482.
The petition contains some allegations appropriate to a petition for a writ of habeas corpus, but most of the allegations pertain to financial matters. There are paragraphs alleging failure to pay obligations incurred by the mother and boys for the benefit of the latter; other paragraphs deal with the refusal of the husband to settle, or even discuss with the mother the proper schools for the children to attend; and still others are based apparently on the assumption that in an action to ascertain the proper custody of *471 infants, the court may inquire into the financial standing of the father and determine in advance the amount of money he should pay, under his common law obligation, to support and maintain infant children.
The pleading, except insofar as it pertains to the custody of infants, is not appropriate to an action at law or a bill in equity.  If it was intended to be based on contract, damage for its breach is not stated with certainty.  If it was intended to be based on the common-law obligation of the father to support his infant children, the amount claimed to be due or to become due is not stated.  However, the trial court gave relief under both theories, but, in order to ascertain the proper amount of past due indebtedness, the papers in the case were referred to a special commissioner to ascertain the amount of bills incurred and unpaid.
The commissioner's report was duly confirmed and judgments entered thereon against the father in favor of the different parties with whom the mother and sons had contracted.  The court then ascertained the annual income of the father during the preceding five years, and his probable income for the next few years, and fixed the common-law obligation of the father to support and educate his two sons at $375 per month, in addition to the sum set forth in the order of September 29, 1933.  As John R. Buchanan was held in contempt only for his failure to pay his divorced wife the sum of $375 monthly, under this order, which is brought under review by this writ of error, the validity of the judgments against him for unpaid accounts is not before us for adjudication.
  Mr. Minor in his Institutes, vol. I, p. 405, states the common-law duty of a father thus:  "The wants and weakness of childhood render maintenance by some one other than the child himself indispensable, and the voice of nature indicates the parent, that is the father, as the fittest person to afford it. The duty of maintenance on the part of fathers in respect to their infant children is, therefore, a principle of natural law, the right to which, on the part of such children, is insisted upon as a perfect right by *472 the most eminent authorities, as, amongst others, by Puffendorf and Montesquieu.  * * *"
"The municipal laws of all well regulated societies take care to enforce this duty; though Providence has done it more effectually by implanting in the heart of every parent that unquenchable affection which not even the deformity of person and mind, nor the wickedness, ingratitude, and rebellion of children can totally extinguish."
  The obligation of a father to support his minor children is similar to a husband's obligation to support a blameless wife.  Judge Kelly on this subject in Mihalcoe  Holub, 130 Va. 425, 430, 107 S.E. 704, 706, says:  "The rules are much the same regarding support of infant children by a father.  He owes them the duty of maintenance.  This, by the weight of American authorities, founded upon common sense and natural justice, is a legal, and not merely a moral, obligation.  Where the child is living away from the father, the question of his liability will depend upon the circumstances of the case."
A discharge in bankruptcy of the father does not constitute a bar to his continuing legal obligation to support minor children, even when the obligation is evidenced by contract, and the minor children are living, by the consent of the father, with the mother who was divorced from her husband on the ground that she had deserted him.  Dunbar  Dunbar, 190 U.S. 340, 23 S.Ct. 757, 47 L.Ed. 1084.
  The jurisdiction of the trial court to enforce the common-law obligation of the father for future maintenance and education was invoked by a joint petition of the infants themselves and the mother.  Actions or suits, by or in behalf of a child against its parent, should not be encouraged.  They tend to disturb the cordial relationship that should exist by virtue of blood ties. Such actions, if allowed, render ineffective parental discipline so necessary to the welfare of the child.  They open the door of the court to an unruly or disobedient child who may complain of either the amount or kind of support and maintenance provided by the parent.  Worthington  Worthington, 212 Mo.App. *473  216, 253 S.W. 443.  Perhaps the leading case on the subject is Rawlings Rawlings, 121 Miss. 140, 83 So. 146, 148, 7 A.L.R. 1259, wherein this is said: "'The repose of families and best interests of society forbid' any such action. If the chancellor can fix in advance the amount of support each dissatisfied child must receive, then is parental authority superseded by judicial fiat, parental discipline swept away by self-assertion and disobedience on the part of children, and the integrity of the home, the cornerstone of society, is undermined."  See Huke  Huke, 44 Mo.App. 308; Cunningham  Cunningham, 120 Tex. 491, 40 S.W.(2d) 46, 75 A.L.R. 1305, note 1314.
Each parent is financially able to pay or advance the necessary sum to defray the cost of maintenance and education of the two boys.  The father has remarried and has other obligations, but he receives one-third of the annual income of a trust fund of $3,000,000.  His part of this income is about $50,000 per year.  The mother received from the father, under the contract of May 18, 1931, $150,000 in cash and securities.  On $125,000 of this amount, she receives six per cent. interest.  Her annual income since 1931 has been in excess of $16,000.  In addition, her husband has paid, or agreed to pay, several bills incurred by her, totaling more than $15,000.
  The judgment of the court on its common-law side, so far as it attempted, in this action by minors, to compel their father to provide them an income out of his estate for their future support and education, is void.  To hold otherwise, in this case, would empower the court, on the application of minors, to send their father to jail for his refusal to pay their expenses at some private school of their own selection, although the father was willing to pay their expenses at other schools.  To state the proposition, reveals its unsoundness.
[16-18]  The mother, in this court, contends, contrary to her contention in the lower court, that these proceedings should be regarded as invoking the parental and protecting power of the commonwealth in a chancery court to *474  determine controversies concerning minors, their persons and property.
Minor in his Institutes, vol. I, p. 432, states this power thus:  "This (bill in equity) is the most direct, usual, and eligible remedy, in general, to try the right of the parent to the custody of the child.  The court of chancery, as representing the parental and protecting power of the Commonwealth, has jurisdiction to determine controversies concerning the guardianship of a minor; to make orders for his support, if any property capable of being so applied be within the reach of the court; and in extreme cases, as we have seen, even to control the right of a father to the custody of his child."  Citing Code 1887, section 2609 (Code 1936, section 5326).
The minors in question have no property subject to control of the court.  If it be contended that they have property rights in the contract between their father and mother, the court did not attempt to enforce these contractual obligations as to future expenditures.
  The mother also contends that a court of equity has power, under the recent amendment to Code, section 5111, to enforce the common-law obligation of the husband as to future support.  This section authorizes a court of equity, in a divorce suit on the petition of either party, after a final decree, to "revise and alter such decree concerning the care, custody, and maintenance of the children and make a new decree concerning the same, as the circumstances of the parents and the benefit of the children may require."
One answer to this contention, is that this is not a suit for divorce. There is no decree to be revised.  Another complete answer to both of the foregoing contentions, is that the pleading does not purport to be a bill in equity.  It is a hybrid pleading.  No one is better qualified to determine the class of proceedings to which this belongs than the trial judge, who pronounced the judgments in question.  He has emphatically declared this to be a habeas corpus proceeding.  On that ground he declined to consider the bill *475 of review.  By so holding, the father lost the right to have these judgments, decrees, or orders reviewed, as he would have had, had the trial judge determined that this was a suit in equity, or a proceeding in which he exercised equitable power.
[20, 21]  It is further contended that the plan to compel the father to fulfill his common-law obligation for the future support and education of his sons was adopted at the suggestion of the father's attorney.  It appears that the attorney did make some such suggestion, but this suggestion was to eliminate the payment of $375 per month as set forth in the order of September 29, 1933, and in lieu thereof pay the mother $100, or perhaps $200, a month for the future education of the boys.  The court adopted the scheme by fixing the monthly payments at $750 instead of the $200 suggested.  As soon as this decision was known to the attorney, he filed objections to the entry of the order.  Consent does not give jurisdiction of the subject-matter.  There was no consent to this order.
  The court, whether acting under its common-law powers or under its chancery powers, must act judicially in all cases.  It cannot transcend this power.  "Hence, if an action be upon a money demand, the court would have no power to pass judgment of imprisonment.  If for libel or personal tort, it could not order specific performance of a contract.  If for possession of real property, the court could not admit in the case the probate of a will.  The judgments in the supposed cases would be absolutely void, because the court, in rendering them, would transcend the limit of its authority in those cases." Bailey on Jurisdiction, p. 20.
  At the time of the Revolution, the distinctions between common-law and chancery jurisdiction were as sharply drawn in Virginia as they were in England. Since 1776, these distinctions have been somewhat modified by statute, but the essential distinctions are, in a large measure, still maintained, though exercised by the same judge, on procedure appropriate to each forum.  These distinctions have not been, and should not be, nodified to the extent that *476  equitable relief can be granted, even with the consent of the parties, in a habeas corpus proceeding, -- a proceeding confined to investigate the validity of restraint of the person, or custody of infants.  We have been cited to no case in Virginia and to none in other jurisdictions where, without the express aid of statute, a money award in a habeas corpus proceeding has been held valid.
Judge Kelly, speaking for the court in Litz  Rowe, 117 Va. 752, 758, 86 S.E. 155, 157, L.R.A. 1916B, 799, said:  "It is true that the appellants invoked the jurisdiction of the court, and that the appellees (after they had resisted the filing of the petition, however, and had entered a demurrer thereto) expressed in their answer a willingness to have the two tracts surveyed as prayed for in the petition.  But this is a controversy which belongs exclusively to a court of law, and no acquiescence or consent could create a jurisdiction over it in equity.  Merwin's Eq., sec. 108, p. 59; Stuart's Heirs  Coalter, 4 Rand. (25 Va.) 74, 79, 15 Am.Dec. 731; Boston Blower Co.  Carman Lumber Co., 94 Va. 94, 100, 26 S.E. 390; Freer  Davis (52 W. Va. 1, 43 S.E. 164, 59 L.R.A. 556, 94 Am.St.Rep. 895), supra."
"In his Notes on Equity Jurisprudence, at p. 8, Prof. W. M. Lile says:  'It is settled, save possibly in Massachusetts, that consent cannot confer jurisdiction -- that is to say, if a suit which properly belongs to a court of law be brought in equity, even though the defendant make no objection, and be willing that equity shall adjudge the matter, the chancellor himself will take notice of the defect of jurisdiction and the cause will be dismissed."
* * *
"This is not the case of a plaintiff coming in an irregular manner into a proper forum and seeking later to take advantage of errors committed at his instance or through his default or acquiescence.  The difficulty here is that the proceedings were had in a forum having no jurisdiction of the subject matter."  *477 
  The general rule is concisely stated in Armstrong  Obucino, 300 Ill. 140, 133 N.E. 58, 59:  "The doctrine that where a court has once acquired jurisdiction it has a right to decide every question which arises in the cause and its judgment or decree, however erroneous, cannot be collaterally assailed, is only correct when the court proceeds according to the established modes governing the class to which the case belongs, and does not transcend in the extent and character of its judgment or decree the law or statute which is applicable to it."  See Windsor  McVeigh, 93 U.S. 274, 282, 23 L.Ed. 914; Anthony  Kasey, 83 Va. 338, 5 S.E. 176, 5 Am.St.Rep. 277; Aetna Casualty & Surety Co.  Board of Supervisors, 160 Va. 11, 44, 45, 168 S.E. 617; Bray Landergren, 161 Va. 699, 713, 172 S.E. 252; Watson  Mose, 165 Va. 661, 666, 183 S.E. 428.
[25, 26]  The contract between mother and father is not before this court for construction; however, such a contract is not binding upon a court, as to the custody of infants, nor will the courts permit a parent, under any or all circumstances, to transfer to another his common-law obligation to his children. The custody and welfare of children are not the subject of barter.  In this case, the father has not by contract severed his right to participate with the mother in supervising the education of his children.  The court has deprived him of that right on the application of the children themselves, acting jointly with the mother.  The father, by his conduct, may have forfeited the right to participate in the supervision of the education of his children; if so, the mother may defray the expenses of their maintenance and education, and recover for all moneys so expended.  See Kelly  Kelly, 329 Mo. 992, 47 S.E.(2d) 762, 81 A.L.R. 875.
  The trial court had jurisdiction upon the petition filed by the mother, even if improper parties were joined, to determine the custody of the children.  It had no jurisdiction or power, in the procedure adopted, to determine the *478 question of compensation for the future maintenance and education of the two boys.
For the reasons stated, the judgment of the trial court, holding Jhon R. Buchanan in contempt, is reversed, and the case remanded, with direction to release him from custody.
Reversed.
