The plaintiffs, Paul and Shirley Delude, filed a declaratory judgment action seeking a determination that the provisions of the zoning ordinance of the Town of Amherst pertaining to mobile homes violate RSA 674:32 (Supp. 1992) and the State Constitution. The Superior Court (Goode, J.) dismissed the petition. We affirm in part and reverse in part.
The plaintiffs informally presented a proposal to build a manufactured housing park to the town planning board. Having concluded with “absolute certainty that any [formal] application for approval could not be granted” by the town, the plaintiffs made no formal application; instead, they filed their petition for declaratory judgment. Despite filing numerous pleadings and amendments thereto, and moving successfully for a voluntary nonsuit of their claims under the town’s affordable housing ordinance provisions, the plaintiffs did not satisfy the trial court’s repeated requests to identify with particularity their legal grievances. Accordingly, the trial court issued an order on March 11, 1991, instructing the plaintiffs to identify their claims with “particularity” and to “avoid the prolixity which ... attended this case from its inception.” The plaintiffs merely further amended their pleadings by filing a supplement, which incorporated their earlier allegations by reference. Ruling that the plaintiffs still *363had not complied with its order, the trial court held a hearing at which the plaintiffs were required to show cause why their action should not be dismissed.
At the hearing, the plaintiffs first claimed that the town had acted in bad faith: (1) by amending its zoning ordinance in 1988; (2) by opposing an amendment that the plaintiffs had proposed at a town meeting; and (3) by denying the plaintiffs’ submission of an application under the affordable housing ordinance. The plaintiffs contended at the hearing that this alleged bad faith justified their continuing challenge to the validity of the ordinance provisions that were rendered ineffective by the 1988 amendment. The plaintiffs’ counsel conceded, however, that their claims of bad faith were based only on “suspicions inferred from circumstances” that could not be proven at that time without further discovery. Second, the plaintiffs contended that the town’s mobile home ordinance is invalid because the density requirements were established without resort to a “comprehensive study.” Third, the plaintiffs argued that the ordinance should be declared invalid because it is “to their way of thinking unreasonable.” The trial court dismissed the plaintiffs’ petition, ruling that the plaintiffs failed to state facts from which the court could find a justiciable controversy ripe for declaratory judgment.
The plaintiffs have asserted two types of claims in their petition: first, they allege that the ordinance provisions are unconstitutional as applied to them; and, second, they assert a facial challenge to the validity of the ordinance provisions. We address these claims separately.
Whether to issue a declaratory judgment is a discretionary matter for the court. P. Loughlin, 13 New Hampshire Practice, Local Government Law § 922, at 630 (1990). “[A]n ordinance will not be invalidated by a court on the mere conjecture that a municipality will either interpret or administer the ordinance in a manner detrimental to the constitutional rights of a petitioner. There must be some action taken and harm done before the ordinance will be invalidated.” Id. § 916, at 620 (footnote omitted). A declaratory judgment will not be issued unless the plaintiffs have demonstrated a present legal or equitable right, RSA 491:22 (1983) (amended 1992), and an adverse claim that is “definite and concrete touching the legal relations of parties having adverse interests. . . . The action cannot be based on a set of hypothetical facts.” Silver Brothers, Inc. v. Wallin, 122 N.H. 1138, 1140, 455 A.2d 1011, 1013 (1982) (quotations omitted). The plaintiffs never filed a formal application for the town’s approval of their plan, nor did they apply for a variance after the *364town suggested that they may need a variance to pursue development of their proposed manufactured housing park. The plaintiffs merely speculated as to what the town would do if they were to file an application for approval, or if they were to apply for a variance. Although they are not necessarily required to exhaust all available administrative remedies before challenging the ordinance as applied to their property, see Blue Jay Realty Trust v. City of Franklin, 132 N.H. 502, 509, 567 A.2d 188, 193 (1989), the plaintiffs have not even taken the steps necessary to “show that the facts are sufficiently complete, mature, proximate and ripe to place [the plaintiffs] in gear with [their] adversary, and thus to warrant the grant of judicial relief.” Merchants Mut. &c. Co. v. Kennett, 90 N.H. 253, 255, 7 A.2d 249, 250-51 (1939) (quotations omitted). Therefore, we agree with the trial court that the plaintiffs have failed to present facts which demonstrate a present legal or equitable right to which the town is asserting an adverse claim.
The trial court ruled that the plaintiffs failed to frame any justiciable controversy for which declaratory relief would be appropriate. We have held that “[a]ctions for declaratory judgment should be confined to justiciable controversies of sufficient immediacy and reality as to warrant action by the courts.” Salem Coalition for Caution v. Town of Salem, 121 N.H. 694, 697, 433 A.2d 1297, 1299 (1981). Accordingly, the trial court properly declined to entertain a petition to “invalidate [the] ordinance based on a mere conjecture that the [town would] either interpret or administer the ordinance in a manner detrimental to the constitutional rights” of the plaintiffs. City of Lebanon v. Townsend, 120 N.H. 836, 838, 424 A.2d 201, 203 (1980). We hold that the facts of this case make declaratory judgment inappropriate as to the plaintiffs’ “as applied” claims, which include their equal protection and due process claims.
Among their sundry vague and conclusory allegations, however, the plaintiffs arguably launched a facial attack on the town’s zoning ordinance provisions relating to mobile homes. The trial court can address the legality of the town’s mobile home provisions under RSA 674:32 (Supp. 1992). See, e.g., Jensen’s, Inc. v. City of Dover, 130 N.H. 761, 766-68, 547 A.2d 277, 280-82 (1988); Town of Plaistow v. Nadeau, 126 N.H. 439, 444, 493 A.2d 1158, 1162-63 (1985). Moreover, using “a declaratory judgment to test the legality of a zoning restriction allegedly in excess of the jurisdictional authority of the zoning power is not without precedent in this state.” Vlahos Realty Co. v. Little Boar’s Head District, 101 N.H. 460, 465, *365146 A.2d 257, 261 (1958); see Gutoski v. Winchester, 114 N.H. 414, 415, 322 A.2d 4, 5 (1974). In Blue Jay Realty Trust, we held that a direct challenge to the validity of zoning enactments was permissible under the declaratory judgment statute, RSA 491:22. See Blue Jay Realty Trust, 132 N.H. at 513, 567 A.2d at 195-96. Thus, assuming the plaintiffs are facially attacking the ordinance, we remand this case with instructions to the trial court to permit the plaintiffs to file a declaratory judgment petition setting forth specifically, clearly, and concisely their facial attack on the town’s ordinance provisions regulating mobile homes. Of course, to the extent that amendments to the town’s zoning ordinance have rendered issues moot, such issues are no longer justiciable. In remanding, we note that the plaintiffs carry the burden of proving the invalidity of the town’s zoning ordinance; “[w]hen a municipal ordinance is challenged, there is a presumption that the ordinance is valid and, consequently, not lightly to be overturned.” Town of Nottingham v. Harvey, 120 N.H. 889, 892, 424 A.2d 1125, 1127 (1980).
Affirmed in part; reversed in part; remanded.
All concurred.