OPINION
By SKEEL J:This is an original action in this court. The relator, now confined in the Workhouse under sentence of the Municipal *548Court of Cleveland of one year and costs, having been found guilty by that court of intoxication and sentenced under the statute as an habitual offender, seeks release from such imprisonment upon a writ of habeas corpus wherein it is claimed that she is unlawfully detained.
The affidavit upon which the relator’s trial, conviction and sentence was found, charged that on or about the 29th day of August, 1948, Jean Von Alt in said city of Cleveland and county of Cuyahoga did unlawfully become intoxicated and-was found in a state of intoxication in said city.
The affidavit further alleged that Jean Von Alt on three occasions prior thereto, had-been charged, tried, found guilty and sentenced to the Workhouse of the city of Cleveland for intoxication. The three prior prosecutions were on charges of violating Section 2991 of the ordinances of the city of Cleveland providing against being found in a state of intoxication within the city, and were as follows: — Sept. 5, 1947, charge: intoxication; plea of guilty; sentenced costs and 30 days in Workhouse; Nov. 18, 1947, charge: intoxication, plea of guilty, sentenced costs and 30 days in Workhouse: July 8, 1948, charge: intoxication; plea of guilty, sentenced costs and 60 days in Workhouse.
It is the claim of the relator that the affidavits upon which two of the prior convictions were based were- defectively executed; not sufficient in law and fact to charge a penal offense against her; and that the record of such conviction should not have been received in evidence for the purpose of sustaining a charge of being an habitual offender under §4131 GC.
An examination of the affidavit upon which the relator was tried on the charge of intoxication and sentenced as an habitual offender, contains allegations sufficient to state a cause of action and its execution is in every respect in accord with all legal requirements. The evidence also discloses that the journal of the municipal court shows that the relator did plead guilty to the three prior offenses and was sentenced to the Workhouse on each occasion. No appeal or other proceeding wds ever prosecuted by the relator seeking to reverse or modify the judgment of the municipal court in any of the cases included in the affidavit filed August 29, 1948, charging the relator with intoxication and alleging her to be an habitual offender as provided by §4131 GC or §13457-2 GC.
There is complete agreement between the parties that the municipal court has jurisdiction to try and fully determine the issues presented on a charge of violating the Cleveland City Ordinances declaring that one found in a state of intoxi*549•cation is guilty of a misdemeanor and subject to the penalty provided in such ordinance. The record shows conclusively 'therefore: — (1) that the court had jurisdiction to try all of the actions involved in this proceeding; (2) that the affidavit in the case filed against the relator on August 30, 1948, contained all of the necessary allegations as required by law and were sufficient to state a cause of action; (3) that the'journal ■of the municipal court records the three convictions relied upon to establish that the relator was an habitual offender.
The relator, as indicated above, seeks to go back of the journal of the municipal court on two of the prosecutions .relied on to establish that she was an habitual offender to -show that the affidavits upon which such prosecutions were based were not sufficient to charge an offense.
It is not the function of the writ of habeas corpus to be substituted for an error proceeding. It cannot be used to collaterally attack a judgment of a court on matters of which such court had jurisdiction. And where the only question raised is whether or not a trial court erred in receiving evidence as to challenge the sufficiency of the evidence introduced to support one of the issues presented in the case the ■validity of a judgment cannot thus be questioned by a writ of habeas corpus.
In Ex Parte Elicker, 26 Oh Ap 352, the relator pleaded ■guilty in the common pleas court to an indictment wherein he was charged with a violation of the prohibition law as a third offender in violation of §6212-15 GC and had been •sentenced to the penitentiary. The two preceding violations relied on as evidence that the offense- then being tried was his third offense, were tried in a mayor’s court and in both cases the defendant had pleaded guilty. In the habeas corpus proceeding it was contended that the mayor’s court could not try the relator under the authority of Tumay v. State, 273 3ST. S. 510, because of the interest of the trial court in the •proceeding. The Court of Appeals said, at page 355 of the •opinion:
“The record in this case discloses that Elicker is imprisoned, not by virtue of any sentence or judgment of the mayor ■of Lockington, but is imprisoned by reason of the sentence and judgment of the court of common pleas of Shelby County, •and that it is the judgment and sentence of the court of ■common pleas of Shelby County that is sought to be held -void by means of a writ of habeas corpus.”
The syllabus is as follows:
*5501. Where the defendant is convicted in the-court of common pleas upon an indictment for a third offense for possession of intoxicating liquor, and where, upon a plea of guilty such trial court orders the defendant imprisoned as for a third offense, and the defendant is so imprisoned, a writ of habeas corpus is not the appropriate remedy to secure the defenda'nt’s release.
2. In such case the trial court had jurisdiction to determine the regularity of the first and second convictions, and if the trial court erred in such determination then the defendant’s remedy is a proceeding in error and not a writ of habeas corpus.”
The supreme court' of Ohio affirmed the holding of the court of appeals in Ex Parte Elieker, 117 Oh St 500. The court said, at page 502 of the opinion:
“This court has heretofore had under consideration to be. measured by that statute the case of Yutze v. Copelan, 109 Oh St 171, 142 N. E. 33, 32 A. L. R. 1048. It was there declared, all judges concurring, that a writ of habeas corpus will not lie to test the constitutionality of a statute or ordinance claimed by the applicant for the writ to be unconstitutional, where the applicant has been convicted and where the court entering the judgment of conviction had jurisdiction to determine the question of constitutionality. In the instant case, there is. no claim of unconstitutionality of the statute defining the offense, but it is claimed that the statutes providing the jurisdiction of the mayor to enter the judgments upon the first and second offenses were unconstitutional and that for that reason there could be no valid indictment for a third offense. Both cases, therefore, rest upon a claim of unconstitutionality of statutes.”
The rule is stated in 20 O. Jur 436, parag. 16, as follows:
“The sufficiency of an indictment cannot be challenged on habeas corpus. Consequently, where a court having jurisdiction over an offense punishable by a valid law pronounces sentence and the commitment under such sentence is returned, on habeas corpus the form of the indictment or the want of proper allegations therein cannot be inquired into. Even though an indictment does not charge any crime, it-is not triable on habeas corpus. In such cases the court having jurisdiction of the offense- must pronounce the law of the case and until reversed by some competent tribunal, *551is conclusive on other courts and prevents collateral inquiry-on habeas corpus.
The fact that an indictment may be defective, is not ground for securing discharge under a habeas corpus proceeding instituted in another court. Such court should leave the matter to be determined by the court in which the case is pending. In such a court a demurrer to the indictment will raise the question whether the facts stated therein constitute an offense punishable by the laws of the state. In contemplation of law all rights of the defendant are thereby preserved; for the presumption is that the court will properly decide the question and if it does not, it can be reviewed in the usual and regular manner by proceedings in error.”
We conclude therefore that the alleged defective affidavits •cannot now be inquired into in this proceeding. Whether they were defective or not cannot now be inquired into by this writ. The sufficiency of the evidence as to the prior convictions can only be reviewed in an error proceeding.
It is further claimed that the commitment issued by the clerk upon which the relator was admitted to the workhouse upon the sentence as a fourth offender, by the municipal court on August 31, 1948, did not comply with §4132 GC and for that reason the relator is unlawfully detained.
Sec. 4132 GC provides in part:
“* * * the fact of former conviction shall be charged in the information or complaint and if proved shall be stated irt the commitment * *
The commitment upon which the relator was received -at the Workhouse on August 31, 1948, did not state the fact of the former convictions.
The relator in support of her contention that such defective commitment may be reached by a. proceeding in habeas corpus relies strongly on the case of In Re Moreno, 83 Oh Ap 54, decided by the Hamilton County Court of Appeals on July '8, 1948, a case in which the relator had been sentenced as an habitual offender on a charge of intoxication. Two of the former convictions therein relied upon as to establish that the defendant was an habitual offender were cases in which the sentences upon plea of guilty for intoxication were not to the Workhouse of the City of Cincinnati, but rather to the County Jail.
It will be noted that §4131 GC in part provides:
*552“Every person who, after having been three times convicted,, sentenced and imprisoned in any workhouse or workhouses, for offenses committed in this state, whether in violation of law or ordinance, shall be convicted of a fourth misdemeanor,, whether committed in violation of an ordinance of a municipality or law of the state, punishable by imprisonment in» any workhouse within this state, shall upon conviction for such offense be held and' deemed to be an habitual offender
The court in the Moreno case, held at page 59 of the-opinion:
“The commitments, contrary to the requirements of §4131 GC. do not carry therein ‘the fact of former convictions.’ * *
The court was referring to the fact that the former commitments were not to the workhouse and did not intend to hold that the defective commitments where all of the other facts, come within the statute, was such a circumstance as could' be reached by a writ of habeas corpus.
We conclude that such erroneous commitments, if the relator felt aggrieved thereby, could have been corrected by a. proper proceeding in error. A writ of habeas corpus is not the proper proceeding to call such errors to the attentions of a reviewing court.
For the foregoing reasons the writ is denied. Exc. Order-See Journal.
HURD, PJ, concurs, MORGAN, J, not participating.