
39 Cal.2d 561 (1952)
CHAS. L. HARNEY, INC. (a Corporation), Appellant,
v.
CONTRACTORS' STATE LICENSE BOARD et al., Respondents.
S. F. No. 18224. 
Supreme Court of California. In Bank.  
Sept. 23, 1952.
 Gardiner Johnson, Roy D. Reese and Thomas E. Stanton, Jr., for Appellant.
 Edmund G. Brown, Attorney General, and J. Albert Hutchinson, Deputy Attorney General, for Respondents.
 GIBSON, C.J.
 This appeal was taken from a judgment on the pleadings for defendants in an action for declaratory relief, and the sole question to be determined is whether plaintiff corporation has alleged facts which entitle it to a declaration of its rights and duties.
 The complaint alleges that plaintiff is licensed as a general engineering contractor and is qualified to perform all types of construction requiring special skill, including all classifications of "specialty contract work" as defined in the Business *563 and Professions Code.  [fn. 1] Defendant board has adopted a regulation, rule 732, which subdivides all specialty contracting work into 31 classes and requires a separate license to perform each class of work.  [fn. 2] The board has informed plaintiff that all general engineering contractors, prior to bidding on, contracting for or performing any class of work referred to in the rule must apply for and obtain the specialty licenses required thereby. The several departments, divisions and agencies of the state and all political subdivisions having to do with public work have been notified that general engineering contractors have no right to bid on, contract for or perform specialty construction work unless they are holders of the appropriate specialty licenses. Plaintiff corporation has never applied for any specialty licenses, and it asks for a declaratory judgment with respect to its right to perform the types and classifications of work referred to in rule 732.
 There is no statute which requires licensed general engineering contractors to obtain additional specialty licenses as a condition to performing the types of jobs which are listed in rule 732, and it is not claimed that the rule requires such additional licenses where the general engineering contractors undertake specialty work as a part of a larger project which they are entitled to perform. The rule, however, operates to prohibit a licensed general contractor from undertaking any contract which involves specialty work alone, unless the general contractor first obtains the appropriate specialty license. *564 Plaintiff, by this action in declaratory relief, is seeking to test the validity of the administrative regulation.
 Section 1060 of the Code of Civil Procedure provides that an interested person may obtain declaratory relief "in cases of actual controversy relating to the legal rights and duties of the respective parties." Section 11440 of the Government Code, which is a part of the Administrative Procedure Act, provides that any "interested person may obtain a judicial declaration as to the validity of any regulation by bringing an action for declaratory relief ... in accordance with the provisions of the Code of Civil Procedure ..."
 [1] Plaintiff corporation is qualified to perform specialty work, but it is prohibited by rule 732 from undertaking any contract therefor without obtaining a specialty license, unless the work is part of a general project. It is, therefore, an interested party within the meaning of the sections cited above. Defendants contend, however, that plaintiff has failed to show that an actual controversy exists because there is no allegation that it has bid or intends to bid on work for which a specialty license is required by the board. [2] Although plaintiff does not specifically allege that it intends to bid on such work, it is clear from a reading of the complaint as a whole that it desires to do so. With respect to plaintiff's failure to allege that it has bid on specialty work, we are of the view that such an allegation is unnecessary. [3] As we have seen, plaintiff as an interested party is entitled under section 11440 of the Government Code to obtain a judicial declaration as to the validity of rule 732 in accordance with the provisions of section 1060 of the Code of Civil Procedure which specifically authorizes a declaration of rights or duties "before there has been any breach of the obligation in respect to which said declaration is sought." Plaintiff, therefore, is not required to violate the administrative regulation and thereby subject itself to possible criminal prosecution or disciplinary action in order to obtain a declaration of its rights and duties. (See Bus. & Prof. Code,  7028, 7030, and 7090.) In this connection, it may be noted that if plaintiff performed the work in violation of rule 732, it would run the risk of being unable to maintain a suit to recover therefor. (See Bus. & Prof. Code,  7031.) [4] The Legislature, by enactment of section 11440, must have intended to permit persons affected by an administrative regulation to test its validity without having to enter into contracts with third persons in violation of its terms or to subject themselves to *565 prosecution or disciplinary proceedings. (See Div. of Adm. Proc., 3d Biennial Report [1951] p. 18.)
 [5] Since the complaint is legally sufficient and sets forth facts and circumstances showing that a declaratory adjudication is appropriate, it was error for the trial court to enter a judgment for defendants on the pleadings. (Columbia Pictures Corp. v. DeToth, 26 Cal.2d 753, 762 [161 P.2d 217, 162 A.L.R. 747].)
 The judgment is reversed.
 Shenk, J., Carter, J., Traynor, J., Schauer, J., and Spence, J., concurred.
 EDMONDS, J.
 I concur in the judgment of reversal solely upon the ground that judgment on the pleadings should not have been granted without leave to amend. As I read the complaint, it does not state any facts showing that Harney has a sufficient legal interest to maintain the action. However, the plaintiff should not have been foreclosed from a further attempt to state facts justifying the relief sought. (MacIsaac v. Pozzo, 26 Cal.2d 809, 815-816 [161 P.2d 449].)
 Only an "interested person" may obtain declaratory relief to determine the validity of an administrative regulation (Gov. Code,  11440.) The bare allegation that Harney is qualified to do specialty contracting work, without more, does not constitute a showing of any interest in the challenged rule. The plaintiff should be required to allege facts showing its interest. These might be, for example, that it had an opportunity to bid on some particular specialty contracting work but was prevented from doing so by the rule, or that, prior to the promulgation of the rule, it regularly bid on the type of work now covered thereby.
 To allow Harney by its present pleading to obtain a determination as to the validity of the rule of the administrative agency in effect provides a convenient method for securing an advisory opinion from this court. This is beyond the scope of the statute and contrary to established judicial procedure. *566
 "(a) General engineering contracting."
 "(b) General building contracting."
 "(c) Specialty contracting."
 At the time this action was commenced, Bus. & Prof. Code,  7056, provided, "A general engineering contractor is a contractor whose principal contracting business is in connection with fixed works for any or all of the following divisions or subjects: Irrigation, drainage, water power, water supply, flood control, inland waterways, harbors, railroads, highways, tunnels, airports and airways, sewerage and bridges."
 Bus. & Prof. Code,  7058, provides, "A specialty contractor is a contractor whose operations as such are the performance of construction work requiring special skill and whose principal contracting business involves the use of specialized building trades or crafts."
NOTES
[fn. 1]  1. Bus. & Prof. Code,  7055, provides, "For the purpose of classification, the contracting business includes any or all of the following branches:
[fn. 2]  2. Rule 732 provides in part: "Specialty contractors are classified into the following subclassifications:" then follows a list of 31 classifications, including such classes as "Cement and Concrete"; "Excavating, Grading, Trenching, Paving, Surfacing"; "Sewer, Sewage Disposal, Drain, Cement Pipe Laying"; and "Classified Specialists." See 16 Cal. Adm. Code 732.
