When any unit desiring to issue any obligations shall hold an election for that purpose in accordance with the provisions of the Constitution and laws of this state controlling and regulating such election and the returns of such election shall show prima facie that such election is in favor of the issuance of such obligations, or when the governing body of any unit, in any case where an election is not required by the Constitution or laws of this state, shall adopt any ordinance or resolution or take any other action required by law for the issuance of obligations of such unit, the governing body of such unit may in its discretion, before the issuance of any of such obligations, determine its authority to issue such obligations and the legality of all proceedings had or taken in connection therewith, the validity of the tax or other means provided for the payment thereof and the validity of all pledges of revenues and of all covenants and provisions contained in any such ordinance or resolution by filing a petition against the taxpayers and citizens of the unit in the circuit court of the county in which such election has been held or other such proceedings have been had or taken.
Ala. Code § 6-6-751 (1975)