
269 P.2d 765 (1954)
GRAYOT
v.
SUMMERS.
No. 8060.
Supreme Court of Idaho.
March 24, 1954.
Rehearing Denied April 26, 1954.
Herman E. Bedke, Burley, for appellant.
Robert E. Smylie, Atty. Gen., J. Ray Durtschi, Asst. Atty. Gen., William H. Bakes, Asst. Atty. Gen., Twin Falls, for respondent.
PORTER, Chief Justice.
This is an action for a declaratory judgment under the provisions of Chapter 12, Title 10, I.C. Appellant is a duly licensed electrical contractor in the State of Idaho. He alleges in his complaint that respondent, on or about October 30, 1952, made a purported regulation, allegedly under the authority of Chapter 10 of Title 54, I.C., as amended, governing the activities of electrical contractors and journeymen within the State of Idaho. That such regulation is unlawful and not authorized by law. That appellant has failed at times to comply with the requirements of said regulation and respondent has enforced the same by threats of criminal prosecution under the act; and that if appellant continues to refuse to comply with such regulation, respondent will attempt to enforce same by invoking criminal sanctions or by suspending appellant's license.
Appellant prays that the court enter judgment declaring such regulation null and void and as in excess of the powers of respondent to make; and that respondent be permanently enjoined from enforcing such regulation against appellant.
*766 A copy of the regulation in question is attached to the complaint and reads as follows:

"State of Idaho Department of Law Enforcement State Electrical Board Regulation
"A. From and after the first day of December, 1952, all installations of electrical conductors and equipment, as hereinafter described, save and except as provided by Section 54-1016, Idaho Code, and further, except in any city or village in which the Inspectors of the Department of Law Enforcement are unauthorized to make inspections, shall be required to be inspected by an inspector of the State of Idaho and approved by said inspector; said electrical installations, and all changes of electrical conductors and electrical equipment as hereinafter described shall be made in substantial accord with the National Electrical Code as approved by the American Standards Association, and unless said installations shall be so made, shall not be approved by said inspectors. It is further provided that for all new electrical conductors and installations, the contractor, or person making such installations or doing said wiring, at the beginning of the work, shall make application to the Department of Law Enforcement of the State of Idaho for an inspection of said electrical installations upon forms provided by the said Department.
"B. The State Electrical Board of the Department of Law Enforcement of the State of Idaho shall furnish forms of application for inspection service to anyone upon request without charge, which said forms shall be divided into three parts:
"I Part I must be filled out and attached inside the entrance switch or panel installation.
"II Part II of said form must be filled out by the person actually doing the wiring or electrical installation work, or if done by more than one person, then by one of said persons actually doing the wiring or electrical installation work, and mailed to the State Electrical Board at Boise, Idaho, prior to completion of said electrical installation, together with the necessary fee for inspections as provided by regulation; and
"III Part III of saidform must be filled out and mailed to the Power Supplier.
"C. For the purpose of this regulation the following electrical installations shall require inspection by the State of Idaho:
"1. New Constructions and/or additional feeders or circuits in existing structures for jobs costing in excess of $25.00.
"2. Any change of service entrances.
"3. Temporary services run for supplying power for any and all purposes.
"4. Electrical fences.
"D. The following fees shall be required to be paid (by the owner or contractor) for inspections by Inspectors of the State Electrical Board of the Department of Law Enforcement of the State of Idaho: [Schedule of fees for inspection of various types and kinds of installations.]
"This Regulation is promulgated pursuant to the authority granted in Chapter 10 of Title 54, Idaho Code, as amended.
"Done at the Capitol in Boise, Idaho, this ___ day of Oct 30 1952, 1952.
        "s/  Wayne Summers
             Wayne Summers, Commissioner
             of Law Enforcement of the
             State of Idaho."
Respondent filed a general demurrer to appellant's complaint. The general demurrer was by the trial court sustained and judgment of dismissal entered. From such judgment appeal has been taken to this court.
The first contention of appellant is that the trial court erred in sustaining the general demurrer. In passing upon the general demurrer the trial court specifically recognized there was a justiciable issue presented and recognized the right of plaintiff to bring the action and to have a decision squarely on the facts presented. However, the court apparently sustained the general demurrer on the theory the regulation in question was a valid, existing regulation and one which the respondent had authority to promulgate and enforce.
The authorities generally hold that in an action for declaratory judgment where the complaint shows a justiciable controversy which should be settled, a general demurrer thereto should be overruled, *767 although it may appear that the plaintiff's contention is wrong as to his ultimate rights. 1 Anderson's Actions For Declaratory Judgments, 744, sec. 318, states the rule as follows:
"The test of the sufficiency of a complaint in a declaratory judgment proceeding is not whether the complaint shows that the plaintiff is entitled to the declaration of rights in accordance with his theory, but whether he is entitled to a declaration of rights at all, so that even if the plaintiff is on the wrong side of the controversy, if he states the existence of a controversy which should be settled, he states a cause of suit for a declaratory judgment. And where a complaint in a proceeding for a declaratory judgment stated a justiciable controversy, a demurrer should have been overruled, and after the filing of an answer, a decree containing a declaration of right should have been entered."
The following authorities support the rule: City of Cherryvale v. Wilson, 153 Kan. 505, 112 P.2d 111; Doman Hunting & Fishing Ass'n v. Doman, 159 Kan. 439, 155 P.2d 438; Dallman Supply Co. v. Sweet, 86 Cal. App.2d, 780, 195 P.2d 864; La Hue v. Dougherty, 34 Cal.2d 1, 206 P.2d 640; Reid v. Anderson, 116 Utah 455, 211 P.2d 206; Alabama State Milk Control Board v. Graham, 250 Ala. 49, 33 So.2d 11; City of Bessemer v. Bessemer Theatres, 252 Ala. 117, 39 So.2d 658; Great Northern Ry. Co. v. Mustad, 76 N.D. 84, 33 N.W.2d 436.
It thus appears that the trial court erred in sustaining the general demurrer. However, it is apparent that the decisive question to be determined in this action is not one of fact but is purely one of law, that is, as to the validity of the regulation in question. Appellant has requested this court to pass upon such question despite the error of the trial court in sustaining the general demurrer. Respondent has argued the merits and contends that the trial court in effect passed upon the merits. In Cabell v. City of Cottage Grove, 170 Or. 256, 130 P.2d 1013, at page 1016, 144 A.L.R. 286, at page 291, the court, under a very similar situation, stated:
"Consequently, it will be necessary to reverse the decree; but, to obviate another appeal, we deem it proper to state our views upon the merits."
See, also, Moss v. Moss, 20 Cal.2d 640, 128 P.2d 526, 141 A.L.R. 1422. Under the circumstances we deem it appropriate to express our views as to the validity of the regulation in question.
Appellant contends that the legislature, by Chapter 10 of Title 54, I.C., did not authorize respondent or grant him the power to make such regulation; that the authority to make the same cannot be implied from any express power granted to respondent; and that the alleged fees set out in the regulation for making inspections amount to a tax. It appears to us that a determination of the first two contentions favorable to appellant makes unnecessary a consideration of the third contention.
It is not seriously contended that the legislature does not have the right to regulate electrical installations or that it could not require inspections and reasonable payment therefor. The controlling question here is whether the legislature has expressly or impliedly authorized the issuance of the regulation in issue.
Chapter 10 of Title 54, I.C., is made up of Sections 54-1001 to 54-1018, I.C., inclusive. Section 54-1001, I.C., is as follows:
"Declaration of policy.  From and after the taking effect of this act, all installations in the state of Idaho of wires and equipment to convey electric current and installations of apparatus to be operated by such current, except as hereinafter provided, shall be made in substantial accord with the national electrical code as approved by the American Standards Association, relating to such work as far as the same covers both fire and personal injury hazards, as the same shall be compiled and published from time to time; provided that the provisions of this section shall not apply in incorporated cities and town which by ordinance or building code prescribe the manner in which wires or equipment to convey electric current and apparatus to be operated by such current shall be installed."
*768 The remaining sections of this chapter deal with the licensing of electrical contractors and journeymen. They provide for the issuance of certificates of competency by the Commissioner of Law Enforcement; and provide for the giving of examinations to applicants. They also authorize him to prescribe, amend and enforce rules and regulations for the examination and certification of contractors and journeymen. Section 54-1017, I.C., makes it a misdemeanor to violate any of the provisions of the act. Nowhere in the act is the Commissioner of Law Enforcement charged with the enforcement of the act other than with reference to the issuance and revocation of the certificates of competency. Neither is he expressly given authority to issue rules and regulations to carry out the policy of the act as set out in said Section 54-1001, I.C.
Section 67-2902, I.C., in defining the powers of the Department of Law Enforcement, provides that the Department has power, "To formulate rules and regulations when required in any act to be administered." The act in question does not provide for the making of rules and regulations by the Department of Law Enforcement covering the matter of installation and inspection of electrical equipment and making a charge for inspection.
The general power of the Department of Law Enforcement with reference to the enforcement of the act is contained in Section 67-2901, I.C., par. 15, which reads in part as follows:
"To enforce all of the penal and regulatory laws of the state, to preserve order, and exercise any and all powers, duties and authority of any sheriff or other peace officer anywhere in the state of Idaho, in the same manner and with like authority as the sheriffs of the counties; * * *."
This general power, equal to that of a sheriff, would not sustain the issuance of the challenged regulation.
Respondent calls our attention to the following language in Section 54-1009, I.C., to-wit: "The commissioner of law enforcement shall have power to revoke any certificate of competency if the same was obtained through error or fraud, or if the recipient thereof is shown to be grossly incompetent, or has a second time wilfully violated any of the rules and regulations prescribed by said commissioner, or as prescribed in this act;" and to the language contained in Section 54-1017, I.C., to-wit: "Any person who shall engage in the trade, business or calling of an electrical contractor or journeyman, without a permit or a certificate as provided for by this act, or who shall violate any of the provisions of this act, or the rules or regulations of the commissioner of law enforcement herein provided for, * * *." Respondent contends such language shows an intention on the part of the legislature to vest in the Department of Law Enforcement power to promulgate regulations such as the one in issue. With this contention we cannot agree. In order to authorize an administrative body to make rules and regulations, such as the regulation involved herein, the legislature must expressly authorize such rules and regulations and define the limits thereof. In State v. Heitz, 72 Idaho 107, at page 111, 238 P.2d 439, at page 441, we said:
"A legislature, or other law-making body, in enacting a law complete in itself, designed to accomplish the regulation of particular matters falling within its jurisdiction may expressly authorize an administrative commission (in this case the Commissioner of Public Works) within definite limits, to provide rules and regulations for the complete operation and enforcement of the law within its expressed general purpose, * * *."
See, also, Bird & Jex Co. v. Funk, 96 Utah 450, 85 P.2d 831; State v. Stark, 100 Mont. 365, 52 P.2d 890; Eastern Columbia v. Waldman, 30 Cal.2d 268, 181 P.2d 865; State v. Miles, 5 Wash.2d 322, 105 P.2d 51; Whitcomb Hotel v. California Employment Comm., 24 Cal. 753, 151 P.2d 233, 155 A.L.R. 405; State ex rel. McCarten v. Corwin, 119 Mont. 520, 177 P.2d 189.
Respondent urges if it be held that the Department of Law Enforcement has been given no express authority to make the regulation in question, such regulation is valid as an exercise of implied powers of *769 the Department of Law Enforcement. We have no quarrel with respondent's contention that the Department of Law Enforcement, in addition to the powers expressly given to it by statute, has by implication, such additional powers as are necessary for the efficient exercise of the powers expressly granted or necessary for the discharge of duties imposed upon it by law. However, the act does not grant respondent express powers or charge him with express duties in connection with the enforcement of same, from which could arise implied power to make the regulation under consideration.
It does not appear that the legislature either expressly or impliedly delegated to respondent the right to make rules and regulations to carry out the declared policy of the act, and the violation of which would be a criminal offense. The regulation in issue was beyond the authority of the respondent to make and is void and of no force or effect. The judgment of the trial court is reversed and the cause remanded with instructions to overrule the general demurrer and to proceed further in accordance with this opinion. Costs to appellant.
GIVENS, TAYLOR, THOMAS and KEETON, JJ., concur.
