
478 S.E.2d 295 (1996)
252 Va. 377
W.S. CARNES, INC., et al.
v.
BOARD OF SUPERVISORS OF CHESTERFIELD COUNTY, et al.
Record No. 960352.
Supreme Court of Virginia.
November 1, 1996.
*297 Bruce E. Arkema, Richmond (Cantor, Arkema & Edmonds, on briefs), for appellants.
Steven L. Micas, County Attorney (Jeffrey L. Mincks, Deputy County Atty.; Stylian P. Parthemos, Senior Asst. County Atty., on brief), for appellees.
Present: All the Justices.
*296 KEENAN, Justice.
The primary issue in this appeal concerns the validity of two ordinances which impose a $125 increase in the fee charged for new residential building permits.
The Home Builders Association of Richmond, Inc. (the Association), and W.S. Carnes, Inc., a Chesterfield County homebuilder (collectively, the builders), filed a motion for declaratory judgment against the Board of Supervisors of Chesterfield County (the Board), and William D. Dupler, the Chesterfield County Building Official. The builders sought an order declaring invalid two ordinances adopted by the Board, which imposed a $125 increase in the permit fee charged for all new residential construction.
In their motion for declaratory judgment, the builders contended that the ordinances violate (1) Code § 36-105, which authorizes a locality to charge building permit fees only to defray the cost of building code enforcement and related appeals; (2) Uniform Statewide Building Code[1] § 104.3, which states that building permit fees shall incorporate unit rates; and (3) Code § 15.1-37.3:9(B), which prohibits the direct or indirect use of building permit fee funds for the repair of residences damaged by moisture-related shrinking and swelling in soil having a high clay content.
The builders also alleged that the ordinances violate the "special laws" prohibition of the Virginia Constitution. Va. Const. art. IV, §§ 14 and 15. Finally, the builders contended that the revenue received from the ordinances exceed the County's costs of building code enforcement. The builders sought, among other things, entry of an order declaring the ordinances invalid.
During a bench trial, Dupler testified that in 1991, the Board became aware that many houses in the County had cracked foundations caused by the use of improper construction methods for building in soil having a high clay content. This type of soil is commonly referred to as "shrink/swell" soil. Dupler stated that special construction methods are necessary for building in this type of soil because the soil places greater than normal stress on foundations, since the soil expands when wet and contracts when dry. Dupler testified that the cracked foundations were evidence of possible violations of the Uniform Statewide Building Code (building code).
To address this problem, the Board directed the County Administrator to appoint a task force to work with the Building Inspection Department to develop a program which became known as the Citizen's Assistance Program, Phase I (CAP I). The Board enacted the CAP I program in 1993.
CAP I provided for an ombudsman to render "assistance to citizens in resolving shrink/swell soil [problems] and other construction related issues." CAP I also included a provision authorizing the hiring of legal *298 advisors to offer free advice to affected homeowners regarding their available legal remedies.
Under CAP I, homeowners who suspected that their houses had been constructed on "shrink/swell" soil could submit applications requesting the County to examine their house foundations. CAP I authorized the County to obtain the assistance of privately-employed engineers to work on these requests.
Dupler testified that the private engineering assistance was necessary because the County staff was unable to handle the large volume of homeowner requests for investigations. He also stated that his department did not have the necessary laboratory facilities to analyze the soil removed from the homeowners' building foundation sites.
Dupler further stated that, before he retained a private engineer to provide a foundation study of an existing house, his department would review the homeowner's CAP application to determine whether the house had foundation cracks. If Dupler noted conditions indicating a potential building code violation, he retained a private engineer on behalf of the County to determine the nature and extent of foundation damage due to "shrink/swell" soil. The engineer then prepared a report, for the homeowner and the County, detailing the extent of damage, the recommended repairs, and an estimated cost of repair.
Although Dupler testified that the reports frequently contained evidence of building code violations, he stated that his department had not instituted criminal enforcement actions because such actions would have been barred by the statute of limitations. However, Dupler used the engineering reports to determine whether a homeowner's proposed repair plans met building code requirements and, thus, qualified for the issuance of a repair permit.
The engineering assistance portion of CAP I was funded from the $125 increase in permit fees authorized by the ordinances. The ombudsman and legal advisor portions of CAP I were paid for out of the general fund and application fees, because these services were not part of the building code enforcement process.
The Board later terminated CAP I and adopted a program known as CAP II, which was limited to providing engineering assistance to the Building Official. Under CAP II, the private engineers hired by the County performed essentially the same functions as the engineers hired by the County under CAP I.
The engineers' reports did not contain any repair specifications and, therefore, could not be used by the homeowners' contractors to perform the necessary repair work. The homeowners were required to retain engineers at their own expense to draw foundation repair specifications, which were submitted to the County with their applications for building repair permits.
After the Building Official issued a repair permit, the homeowner's contractor performed the necessary repairs using the homeowner's repair plan. When the repairs were completed, the Building Official conducted a final inspection to determine whether the repairs had corrected the building code violation.
Like the engineering assistance provided by CAP I, the engineering assistance provided by Cap II was funded by the Board's adoption of an ordinance which increased by $125 the fee charged for new residential building permits. The balance of the permit fee was computed by use of a unit charge of $4.25 for each $1,000, or fraction thereof, of the estimated construction cost.
The trial court also received evidence concerning the builders' contention that the total permit fees exceeded the actual costs necessary to enforce the building code. Their allegations were based on the results of an audit of the Chesterfield Building Inspection Department (BID) commissioned by the Board. The audit, performed by the accounting firm of Coopers & Lybrand in December 1992, indicated that, between 1981 and 1992, BID's revenues exceeded its costs by almost $2,000,000.
The Board presented evidence that the Coopers & Lybrand audit did not include the total expenditures relating to building *299 code enforcement. Specifically, Dupler, James J.L. Stegmaier, the County's Budget Director, and Christine Zitzow, a cost accounting expert, testified that, in order to ascertain the true cost of building code enforcement, the enforcement-related costs of three other County departments needed to be added to BID's expenses.
The three departments, Utilities, Fire, and Environmental Engineering, review all building plans and perform building inspections for the Building Official relating to building code requirements that are within those departments' expertise. The cost of these reviews and inspections were not reflected in the Coopers & Lybrand audit because the audit included only BID budget documents. Stegmaier testified that the revenues received by the County from the building permit fees, including the increases authorized by the fee ordinances, were less than the total cost of building code enforcement in 1993 and 1994.
Finally, the evidence showed that the Association does not build houses in Chesterfield County and has not paid any building permit fees such as those at issue in this suit. The Association is a nonstock corporation, which functions as a trade association and has members who are homebuilders in Chesterfield County.
The trial court initially ruled that the Association had standing to bring this action "in a representative capacity." The court also sustained the County's demurrer to Count III, ruling that the ordinances in question were not special laws within the meaning of Article IV of the Virginia Constitution.
The trial court granted the defendants' motion in limine to exclude evidence of the Board's minutes taken at the time the ordinances were passed. The court stated that, because the fee ordinances adopted by the Board were unambiguous, an examination of the Board's legislative intent was not appropriate. After considering the evidence presented, the trial court held that the CAP ordinances were valid, and that the County did not charge building permit fees in excess of the cost of building code enforcement.
On appeal, we first consider the assignment of cross error raised by the Board and Dupler (collectively, the County), that the trial court erred in ruling the Association had standing to bring this declaratory judgment action. The County argues that the Association does not have any rights which are affected by the ordinances, and that the Association is not authorized by law to bring this action on behalf of its member builders.
In response, the Association argues that, as a nonstock corporation which operates as a trade association for the common benefit of its members, the Association has standing to bring this suit. The Association notes that its status as a nonstock corporation permits it to sue or be sued in its corporate name. See Code § 13.1-826. The Association further argues that the declaratory judgment statutes are remedial in nature and must be liberally interpreted. See Code § 8.01-191. Thus, the Association asserts that it is a proper party to this declaratory judgment action. We disagree with the Association.
A plaintiff has standing to institute a declaratory judgment proceeding if it has a "justiciable interest" in the subject matter of the proceeding, either in its own right or in a representative capacity. Henrico County v. F. & W., Inc., 222 Va. 218, 223, 278 S.E.2d 859, 862 (1981); Lynchburg Traffic Bureau v. Norfolk and Western Railway, 207 Va. 107, 108, 147 S.E.2d 744, 745 (1966). In order to have a "justiciable interest" in a proceeding, the plaintiff must demonstrate an actual controversy between the plaintiff and the defendant, such that his rights will be affected by the outcome of the case. See Code § 8.01-184; Cupp v. Board of Supervisors, 227 Va. 580, 589, 318 S.E.2d 407, 411 (1984).
Here, the Association has failed to demonstrate that it has any rights that will be affected by the outcome of this case. The Association does not build houses in Chesterfield County and has not paid any building permit fees for new residential construction. Thus, the Association has not shown that an actual controversy exists between it and the County.
*300 This conclusion is not altered by the fact that the Association purports to act in a "representative capacity" on behalf of its members. An individual or entity does not acquire standing to sue in a representative capacity by asserting the rights of another, unless authorized by statute to do so. See, e.g., Code §§ 8.01-69, 20-88.45, 37.1-141. Therefore, we conclude that the trial court erred in ruling that the Association had standing to bring this action. Nevertheless, since W.S. Carnes, Inc. (Carnes) paid several building permit fee surcharges to Chesterfield County, the present action remains viable based on the controversy existing between Carnes and the County. See Cupp, 227 Va. at 589-90, 318 S.E.2d at 411.
We next consider Carnes's argument that the trial court erred in sustaining the County's demurrer to Count III of the motion for judgment, which alleged that the fee ordinances violate "the prohibition against special laws contained in Article IV, Sections 14 and 15, of the Constitution of Virginia." Carnes argues that the issue whether the ordinances were special laws was a matter for proof at trial, not susceptible of disposition as a matter of law. We disagree.
A demurrer will be sustained if the pleading, considered in the light most favorable to the plaintiff, fails to state a valid cause of action. See Luckett v. Jennings, 246 Va. 303, 307, 435 S.E.2d 400, 402 (1993); Hop-In Food Stores, Inc. v. Serv-N-Save, Inc., 237 Va. 206, 209, 375 S.E.2d 753, 755 (1989). A demurrer tests only the legal sufficiency of a pleading, not matters of proof. Luckett, 246 Va. at 307, 435 S.E.2d at 402; Cox Cable Hampton Rds., Inc. v. City of Norfolk, 242 Va. 394, 402-03, 410 S.E.2d 652, 656 (1991). The facts admitted on demurrer are those expressly alleged in the motion for judgment, those which fairly can be viewed as impliedly alleged, and those which can be reasonably inferred from the facts alleged. Rosillo v. Winters, 235 Va. 268, 270, 367 S.E.2d 717, 717 (1988).
We conclude that the trial court properly sustained the County's demurrer, because the fee ordinances are general, rather than special, laws.[2] "A law is general though it may immediately affect a small number of persons, places or things, provided, under named conditions and circumstances, it operates alike on all who measure up to its requirements." Bray v. County Board, 195 Va. 31, 36, 77 S.E.2d 479, 482 (1953) (quoting Gandy v. Elizabeth City County, 179 Va. 340, 344, 19 S.E.2d 97, 99 (1942)). By contrast, a law is "special" in a constitutional sense when it contains an inherent limitation that arbitrarily separates some persons, places, or things from those on which, without such separation, it would also operate. Id. at 36-37, 77 S.E.2d at 482.
Here, the fee ordinances are general laws because, by their plain wording, they operate alike on any individual or entity who obtains a building permit for new residential construction. This result is not changed by Carnes's allegation in Count III that the underlying purpose of the fee ordinances was to benefit County residents who had sustained certain damage to their homes. The alleged purpose of the fee ordinances cannot change their content or effect.
Carnes next argues that the trial court erred in granting the Board's motion in limine and in excluding from evidence all minutes of the Board meetings, except actual motions, resolutions, ordinances, and the votes cast on those items. Carnes contends that the excluded minutes would have provided "a clearer understanding of the purpose and the intent" of the ordinances.
We conclude that the trial court properly excluded the proffered evidence of the Board's minutes. Generally, evidence of the Board's intent or motive in enacting ordinances is irrelevant to our consideration whether they are valid laws. As this Court stated in Blankenship v. City of Richmond, 188 Va. 97, 49 S.E.2d 321 (1948),
[c]ourts are not concerned with the motives which actuate members of a legislative *301 body in enacting a law, but in the results of their action. Bad motives might inspire a law which appeared on its face and proved valid and beneficial, while a bad and invalid law might be, and sometimes is, passed with good intent and the best of motives.
Id. at 105, 49 S.E.2d at 325 (citations omitted).
We next consider Carnes's arguments that the fee ordinances are invalid. The trial court's rulings were based on its application of the evidence to the three statutes cited by Carnes. Under Code § 8.01-680, the trial court's judgment will not be set aside unless it appears from the evidence that the judgment is plainly wrong or without evidence to support it. Ravenwood Towers, Inc. v. Woodyard, 244 Va. 51, 57, 419 S.E.2d 627, 630 (1992). Since the trial court heard the evidence ore tenus, its factual findings are entitled to the same weight as a jury's verdict. RF & P Corporation v. Little, 247 Va. 309, 319, 440 S.E.2d 908, 915 (1994). Thus, on appeal we examine the evidence in the light most favorable to the County, the prevailing party at trial, and determine whether the evidence supports the trial court's decision. See Ravenwood Towers, Inc., 244 Va. at 57, 419 S.E.2d at 630.
Carnes first contends that the fee ordinances violate Code § 36-105, which provides, in relevant part, that "[building permit] [f]ees may be levied by the local governing body in order to defray the cost of [building code] enforcement and appeals." During oral argument in this case, Carnes contended that such enforcement is limited to the criminal prosecution and appeal of building code violations. We disagree.
The Building Official has many duties, only one of which is to prosecute building code violations under USBC § 112.3. The Building Official is also charged with responsibility for examining all plans and applications for building permits (USBC § 105.6), issuing permits when satisfied that the proposed work conforms to building code requirements (USBC § 109.1), and conducting inspections to ensure compliance with the building code (USBC § 110.1). Under USBC § 103.3, the Building Official may delegate these duties and powers.
Here, the evidence showed that the engineering assistance funded by the fee ordinances was necessary to enable the Building Official to perform these enforcement-related duties. The ombudsman and legal services provided under CAP I also did not violate Code § 36-105 because those services were paid for out of the general fund, rather than from the permit fee increases. Thus, the trial court's finding that the fee ordinances do not violate Code § 36-105 is supported by the evidence.
We next hold that the record supports the trial court's finding that the fee ordinances do not violate USBC § 104.3, which provides, in relevant part, that "local government[s] shall establish a [building permit] fee schedule. The schedule shall incorporate unit rates which may be based on square footage, cubic footage, cost of construction or other appropriate criteria." The evidence showed that the County's building permit fees incorporate both the $125 flat fee and a unit rate of $4.25 for each one thousand dollars of estimated construction cost. This provision complies with USBC § 104.3, because that section requires only that the fee schedule incorporate unit rates, not that it be based exclusively on unit rates.
We also conclude that the record supports the trial court's finding that the fee ordinances do not violate Code § 15.1-37.3:9(B), which permits a local governing body to enact an ordinance authorizing the use of public funds to repair foundation failures caused by "shrink/swell" soil. The statute provides that public funds expended for this purpose shall be derived only from tax revenues from real and personal property, not from any special fee, assessment, or other tax or charge. The statute also states that localities "may not use fees collected for building permits ... directly or indirectly, for purposes authorized under this subsection."
The evidence showed that the engineering reports funded by the permit fees under the CAP programs were not used to repair foundation failures, but were used to help the *302 Building Official ascertain building code compliance during the various stages of the homeowners' repair efforts. Thus, the expended funds were not used, directly or indirectly, for purposes prohibited by Code § 15.1-37.3:9(B).[3]
Carnes next contends that the trial court erred in finding that the building permit fees did not exceed the cost of building code enforcement and appeals. Carnes relies on the results of the audit conducted by Coopers & Lybrand in support of its position. We disagree with Carnes's contention.
As stated above, the Coopers & Lybrand audit did not include all costs of building code enforcement, nor did the audit cover the time frame in which the CAP programs operated. Additionally, Stegmaier's testimony showed that building code enforcement costs for the years 1993 and 1994 had exceeded the building permit fees collected in those years. Thus, we hold that the evidence supports the trial court's ruling that the expenditures funded by the fee ordinances were rationally related to the cost of building code enforcement.
For these reasons, we will affirm in part, and reverse in part, the trial court's judgment and enter final judgment in favor of the County.
Affirmed in part, reversed in part, and final judgment.
NOTES
[1]  The Uniform Statewide Building Code has been incorporated into Volume 13 of the Virginia Administrative Code (1996) at 5-60-10.
[2]  Based on this conclusion, we do not reach the issue whether Va. Const. art. IV, §§ 14-15, is applicable to the passage of local ordinances.
[3]  Based on this conclusion, we need not address Carnes's argument that, prior to the enactment of Code § 15.1-37.3:9(B) in July 1993, a local governing body did not have the authority to expend public funds to repair existing foundations damaged due to "shrink/swell" soil.
