—The petitioner alleges that he is illegally confined in the Napa state hospital and restrained of his liberty by A. M. Gardner, the superintendent thereof, and seeks his discharge. In his return to the writ issued upon the petition, the respondent shows that he holds the petitioner in custody by virtue of an order of commitment issued by the Hon. A. J. Buckles, judge of the superior court for the county of Solano, on November 9,1899, committing said Lambert to the Napa state hospital as an insane person, and a proper subject for custody and-treatment in an institution for the insane; and sets forth in his return a copy of the order of commitment, together with copies of the petition therefor, and of the certificate of lunacy accompanying the same, which were delivered to him at the same time that the petitioner was delivered at the hospital; *627and averring that the petitioner is still insane, and not competent to be discharged. The sufficiency of this return is controverted by the petitioner upon the ground that the act of March 31, 1897 (Stats. 1897, p. 311), known as the Insanity-Law, under which the proceedings for his commitment were had, is unconstitutional, in that he is thereby deprived of his liberty without due process of law; that the proceedings thereunder are insufficient to authorize his commitment, and that upon the application therefor the judge of the superior court had no jurisdiction or authority to make that order, and that the said order, together with the documents accompanying the same, do not justify his detention or confinement.
The aforesaid act of 1897 purports to be a complete revision of the laws of this state on the subject of insanity, and provision is made therein for the organization of a state commission in lunacy, and the management of the several institutions for the insane, and the mode is prescribed by which patients are to be admitted to the several state hospitals, or otherwise cared for. The provisions authorizing the commitment of a person to a hospital are found in section 3 of article III of the act. An application for the commitment is to be made to the judge of the superior court of the county, by a relative or friend'of the alleged insane person, or by any one of certain designated officials, and is to be accompanied by a certificate of lunacy, for which provision is made in the preceding section. This certificate is to be signed by two of the medical examiners authorized by that section, and must show that it is their opinion that the alleged insane person is actually insane, and “ shall contain the facts and circumstances upon which their opinion is based, and show that the condition of the person / examined is such as to require care and treatment in a hospital for the care, custody, and treatment of the insane.” Upon its presentation to the judge with an application for the order of commitment', that officer is authorized forthwith to determine the question of the insanity of the person, and to immediately issue an order for his commitment to one of the state hospitals. The sheriff is to be immediately notified thereof, and is at once to make provision for his transfer to such hospital. Upon his delivery of the person to the hospital, he shall at the same time deliver to the superintendent the application for the commitment, the' certificate of lunacy, and the order of commitment, *628as. the authority of that officer for the detention of such person.
An examination of the foregoing provisions of the statute shows that there is no provision for giving to the alleged insane person any notice of the proceedings against him, and that, under its provisions, the first intimation that he may have thereof may be when the sheriff takes him into his custody under the order of commitment. The person making the application for the commitment is not required to give him any notice thereof, nor is there any requirement that he shall be informed of the object for which the physicians are examining him. The direction that the application for the commitment shall be “ accompanied ” by a certificate of lunacy not only clearly indicates that the certificate shall have been made before the application is presented to the judge, but it also implies that it may be made at the mere request of the person who is seeking the commitment. This certificate may be made by any two physicians who have received and filed the certificate of a superior judge showing that they possess the requisite qualification. There is no limit to the number of physicians who may become such medical examiners, nor does the act authorize a superior judge to refuse his certificate to any physician who may show himself qualified therefor. No certificate is to be made unless two examiners shall find the person to be insane, but the person seeking the order of commitment is not concluded by the determination of the first examiners to whom he may apply, but is at liberty to continue his application fbr a certificate until he shall find two examiners who will certify to the insanity of the person. The examination is not made by them under any direction of the judge, nor do they receive any letter of authority or power to compel testimony. The > statute does not require that their certificate shall be given under oath, nor does it require that the witnesses before the examiners shall give their testimony under oath, or provide for any oath to be administered to such-witnesses. They are only required to make “ such examination” of the person as will enable them to form an opinion “as to his sanity or insanity,” and their examination may in fact be so conducted that he will have no knowledge that they are examining him for that purpose, or even making any examination of him, and if after such examination they conclude that he is insane, they are to jointly so certify.
*629Upon the presentation to the judge of the certificate and application for the order of commitment, he is authorized “to proceed forthwith to determine the question of insanity.” The statute does not require the judge, when he passes upon their sufficiency, to give any notice thereof to the alleged insane person, or even to require him to be brought into his presence. As the judge to whom the application is made has no notice of the proceedings until after the examination has been had and the certificate has been made, there is no opportunity prior thereto for him to direct any notice to be given. The provision in section 8 for the arrest of an insane person who is shown to be dangerous to person or property, is the only instance provided in the statute for any preliminary notice of a hearing, and the facts prescribed in that section for such notice have no existence in the present-case. The provision that “upon the demand of any relative or near friend in behalf of such alleged insane person, the judge shall, or he may upon his own motion, order a hearing of the application,” is no restriction upon his authority to proceed without giving any notice, since the whole proceeding may be conducted without the knowledge of any relative or friend of said alleged insane person, and if the application for his commitment is made by a relative or friend who has procured the certificate of lunacy from two medical examiners, such relative or friend would not be likely to demand any further hearing. There is also a provision in the act, that if the application is made by any other person than a relative or friend, notice thereof shall be served upon one of certain designated relatives; but if, as in the present case, the application is by a relative or friend, the statute does not require any notice thereof to be given, either to the person alleged to be insane, or to any other friend or relative of his. The provision in section 4 for a trial upon the question of his insanity is effective only after the order of commitment has been made, under which the person may have been immediately placed in the hospital, and cannot be made a substitute for his right to have an opportunity to be heard and to defend himself against the charge before being deprived of his liberty. For the purpose of showing the inefficiency of this provision in protecting a person against an invasion of his constitutional right to a notice and a hearing before he can be deprived of his liberty, it is only necessary to read in connection there*630with the provision that before such trial can be had he must provide for the payment of the costs thereof, and also the provision of section 8 in article I of the act, that after he has been committed to the hospital, he may be restrained of all correspondence with the outer world, except with the superior judge and the district attorney of the county from which he was committed.
The statute thus clearly provides that the proceedings before the judge in a case like the present may be entirely ex parte, and that he may be satisfied that the alleged insane person is insane by merely examining the certificate and petition. He may issue the order of commitment upon the opinion of the two examiners, without any examination by himself of the person sought to be committed, or of the examiners who have made the certificate, and without any knowledge of the facts or testimony upon which they have made their certificate. In thus acting upon these documents, he takes as the sole basis of his action the opinion of the examiners, ascertained as before shown, that the individual is insane. The opinions of practi? tioners of medicine, however, upon the question of insanity are not always uniform or infallible, especially if such opinion is formed ex parte, or without an opportunity for a full investiga? tion of the charge. The mere certificate • of an opinión thus obtained ought not to be a sufficient warrant for an order for the confinement of a person in an insane asylum. There should, at least, be the semblance of a judicial investigation of which a public record can be preserved, before a person can be deprived of his liberty.
In making this order of commitment, the judge is not, however, in the exercise of any of the judicial authority of the state which the constitution has vested in the superior court, but exercises merely a statutory authority which has been conferred upon him by the Insanity Law. No step in the proceeding is taken by a court, nor does the statute require the application for the order or the certificate of the examiners, or the order of commitment, to be filed in any court, or made a matter of ju? dicial record, or become a matter in any respect public, except such as results from their delivery to the superintendent of the hospital, as his authority for receiving and detaining the al? leged insane person. In the exercise of such statutory authority, there is no presumption in favor of its validity, but, as in the case of any process issued by a tribunal or officer whose au*631thority is special and limited by statute, it is essential that the facts upon which depends his right to exercise such, authority, or issue such process, shall not only exist, but shall be also set forth in the document by virtue of which the person is. to be de'r prived of his liberty or estate. *'
It appears from the return in the present case that the application for the order of commitment was made by a person purporting to be a friend of the petitioner, and that it was presented to the judge of the superior court, November 9,1899, and that upon the same day the order of commitment: was made, and the petitioner delivered to the superintendent of 'the Napa state hospital. A certificate of two medical examinerd, as provided by the act, dated November 9, 1899, was delivered to the superintendent at the same time with the order of conn mitment. This certificate is appended to a “ statement of facts V setting forth many items ,in the history of the alleged insane person. It is evident from a mere inspection of this statement of facts that it was derived from others, but it does not appear whether it was prepared under the direction of the examiners after their examination of witnesses in reference thereto, or had been previously prepared and was submitted to them at the time they were requested to examine the petitioner. -Neither does it appear whether the “facts” in the statemeut were ot£tained from the examination of witnesses, or accepted from mere rumor. The statement is not signed by any one, or in any way authenticated by the examiners, nor are the names of the persons from whom the facts were obtained given. The certificate itself does not give the names of the persons whb were examined, nor does it contain the name of the petitioner!, or state that they ever examined the petitioner, or that in then-opinion he is insane,—the blank space for the name of the person examined not having been filled with the name of any one. It is only by inference from the accompanying documents that the certificate can be held to have any application to the. petitioner. •
It does not appear, either from the order of commitment or by the accompanying documents, that any notice was given to the petitioner of an intention to make an application for the order, or that he was ever notified or had any knowledge that the medical exáminers would make any examination or invest tigation in reference to his insanity, or that the judge .of thd superior court ever directed any notice to be given him .-of tha *632application, or of an intention to determine the question of his insanity pnor does it appear that he was present at the time the matter was under consideration by the judge, or was at any time seen or examined by the judge.
The act in question was evidently suggested by the Insanity Law of New York, passed in 1896 (1 N. Y. Laws 1896, chap. 545), and the provisions of that act have been closely copied. The New York statute, however, contains many provisions’ and safeguards for the individual, which are not contained in the law of this state. Section 62 of the New York statute, which corresponds to section 3 of article III of the California statute, provides that “ notice of such application [for the order of commitment] shall be served personally, at least one day before making such application, upon the person alleged to be insane,”—a provision which is wholly omitted in the statute of this state. The section also provides that the judge may dispense with personal service, or may direct substituted service to be made upon some person to be designated by him, but that in such case he shall state, in a Certificate to be attached to the petition for the commitment, his reasons for dispensing with personal service of such notice, and if substituted service is directed, the name of the person to be served therewith. In People v. Wendel, 33 Misc. Rep. 496, 68 N. Y. Supp. 948, the relator had been committed to an insane asylum under the provisions of this section, but had bad no notice of the application, either personally or by substituted service on any one in her behalf, and there was no hearing at which she was either personally present or represented by any person. The court held that, to the extent •that the Insanity Law authorized such proceeding, it was in Violation of the constitution, in that it deprived her of her liberty without due process of law, and ordered her release.
An order for the commitment of a person to an insane hospital is essentially a judgment by which he is deprived of his liberty, and it is a cardinal principle in English jurisprudence that .before any judgment can be pronounced against a person, there must have been a trial of the issue upon which the judgment is given. Under the laws of this state, a guardian of the person or the estate of an insane person cannot be appointed without giving him notice of the application therefor (Code Civ. Proc., sec. 1763); nor can a judgment for so small a sum aa five dollars be rendered against him unless he has been *633served with a summons in the action. (Code Civ. Proc., sec. 411.) Much more is there reason for giving him notice of an application to deprive him of his personal liberty. The provision in the statute for a notice to a relative or friend of the alleged insane person cannot be made the equivalent of a notice to the person himself. Neither can the provision that upon the application for a commitment a hearing may be had upon the demand of any relative or near friend in behalf of the alleged insane person, or upon the motion of the judge himself, be considered as due process of law. What constitutes due process of law may not be readily formulated in a definition of universal application, but it includes, in all cases, the right of the person to such notice of the claim as is appropriate to the proceedings and adapted to the nature of the case, and the right to be heard before any order or judgment in the proceeding can be made by which he will be deprived of his life, liberty, or property. The constitutional guaranty that he shall not be deprived of his liberty without due process of law is violated whenever such judgment is had without giving him an opportunity to be heard in defense of the charge, and upon such hearing to offer evidence in support of his defense. If his right to a hearing depends upon the will or caprice of others, or upon the discretion or will of the judge who is to make a decision upon the issue, he is not protected in his constitutional rights. (Underwood v. People, 32 Mich. 1.1) To say that if he is in fact insane, therefore any notice to him would be vain, is to beg the very question whose determination underlies the right of the state to deprive him of his liberty. The fact of his insanity is to be determined before his right to his liberty can be violated. If that question is determined against him, without any notice or opportunity to be heard, or to introduce evidence in his behalf, and under such determination he is confined in the hospital, his constitutional guaranty is violated.
The case before us does not involve the right of the state to provide for the summary arrest of a person against whom a charge of insanity is made, and his temporary detention until the truth of the charge can be investigated. Such arrest would itself be a notice to him of the charge, under which he would be afforded an opportunity for a hearing thereon. Nor is there *634involved the right of the state to permanently restrain an insane person of his liberty, whether such person be harmless or dangerous, but the question is, whether he is entitled to á judicial investigation of the charge that he is insane, and the right to be heard thereon before its determination. The question to be determined is, not whether the action of the judge in investigating the insanity of the petitioner was conducted under the forms of law, and with proper regard for his rights, but whether the judge had the right to enter upon the investigation, or take any action whatever in reference to his insanity. In the absence from the statute of any requirement of notice to the person, any notice that might be given him would be without legal force and authority, and consequently, whether acted upon by him or disregarded, the proceeding would be equally ineffective. “ It is not enough that he may by chance have notice, or that he may as a matter of favor have a hearing. The law must require notice to him, and give him the right to a hearing and opportunity to be heard. The constitutional validity of a law is to be tested, not by what has been done under it, but by what may. by its authority be done.” (Stuart v. Palmer, 74 N. Y. 188.1) “It is not what has been done, or ordinarily would be done, under a statute, but what might be done under it, that determines whether it infringes upon the constitutional right of the citizen. The constitution guards against the chances of infringement.” (Bennett v. Davis, 90 Me. 105.)
The following authorities may be referred to in support of the foregoing views: Underwood v. People, 32 Mich. 1;2 Petition of Doyle, 16 R. I. 537;3 State s. Billings, 55 Minn. 467;4 Portland v. Bangor, 65 Me. 120;5 Bennett v. Davis, 90 Me. 102; People v. St. Saviour’s Sanitarium, 34 Hun (App. Div.) 363. In the case last cited the question was quite fully considered by the general term of the supreme court of New York. The relator had been committed to an asylum for inebriates for the term of one year, under a provision of a statute of that state authorizing such commitment to be made by any judge of a court of record, upon a certificate in writing, signed by two physicians, containing statements bringing the person within the description *635named in the statute. It was held that as the order had been made without any notice to the relator, and without her presence, she was deprived of her liberty without due process of law, and that the commitment was void, the court very tersely, and aptly phrasing the principle underlying its decision as follows: “No matter what may be the ostensible or real purpose in restraining a person of his liberty, whether it is to punish for an offense against the law, or to protect a person from himself, or the community from apprehended acts, such restraint cannot be made permanent or of long continuance, unless by due process of law.”
Under the foregoing considerations, it must be held that the Insanity Law of 1897, to the extent that it authorizes the confinement of a person in an insane asylum without giving him notice and an opportunity to be heard upon the charge against him, is unconstitutional, and that the proceedings by virtue of which the petitioner is held by the respondent are invalid.
It is ordered that the petitioner be released from the asylum.
Temple, J., Beatty, C. J., and Henshaw, J., concurred.