
243 P.2d 303 (1952)
BOISE CITY
v.
BETTER HOMES, Inc.
No. 7842.
Supreme Court of Idaho.
April 4, 1952.
As Corrected on Denial of Rehearing May 1, 1952.
*304 Maurice H. Greene and Ariel L. Crowley, Boise, for appellant.
C. Stanley Skiles and Anderson & Kaufman, all of Boise, for respondent.
TAYLOR, Justice.
Boise City, a municipal corporation organized and existing under a special charter, commenced this action in the district court in Ada County on December 18, 1950, for the purpose of enjoining the defendant from maintaining a lumber yard on its property located in a "D Commercial" zone.
First the defendant challenges the jurisdiction of the district court, asserting that "it is without jurisdiction of the subject matter." The objection is based upon the sentence found in section 57, paragraph 3, of the charter, to-wit: "The municipal court shall have exclusive jurisdiction of all matters of violations of the city ordinances."
Appellant contends that by this provision the legislature has given the municipal court jurisdiction of the present action to the exclusion of the district court. The original jurisdiction conferred upon the district court by the constitution, Art. 5, § 20, cannot be diminished by the legislature. Const.Art. 5, § 13, Fox v. Flynn, 27 Idaho 580, 150 P. 44; Robinson v. Robinson, 70 Idaho 122, 212 P.2d 1031. As to whether or not the legislature has the power to create a municipal court with jurisdiction in equity such as is involved here, Art. 5, §§ 2, 14, we do not decide. It is sufficient to the disposition of this cause to say that a consideration of the provisions of section 57 of the charter leads to the conclusion that the legislature did not attempt to create a court with such jurisdiction. First, it is noted the city magistrate is not required to be learned in the law. (Paragraph 1.) Following the sentence relied upon and above quoted from paragraph 3, that paragraph further provides: "* * * It shall have original jurisdiction of all actions brought to recover or enforce any forfeiture or penalty declared by any city ordinance, where the amount involved does not exceed $500."
A jurisdiction, which as to amount, is parallel to that of the probate court. Const. Art. 5, § 21. Finally, paragraph 5 provides: "Appeals may be taken and shall be allowed fron final judgments rendered in the municipal court in all actions, in the same manner and with like effect, that appeals may be taken and shall be allowed from final judgments rendered in justices' courts."
It is apparent that the legislature did not intend to create a court with the broad equitable jurisdiction claimed for it by appellant.
It is settled that a city may invoke the aid of equity to enforce its police regulations in a case of this kind, and that the misdemeanor penalty provided by the ordinance is not an adequate remedy. City of Idaho Falls v. Grimmett, 63 Idaho 90, 117 P.2d 461; City of Stockton v. Frisbie & Latta, 93 Cal.App. 277, 270 P. 270; Town of Gallup v. Constant, 36 N.M. 211, 11 P.2d 962; City of San Mateo v. Hardy, 64 Cal. App.2d 794, 149 P.2d 307; Donovan v. Santa Monica, 88 Cal.App.2d 386, 199 P.2d 51. We conclude that the action was properly commenced in the district court.
*305 The trial court, in its conclusions, held that "the legality of the organization of a municipality cannot be attacked at the suit of a private party." This is assigned as error. Assuming the conclusion to mean that a private party cannot attack the annexation of territory to a municipality, we are in disagreement. In the first place an attack upon annexation proceedings is not an attack upon the organization of the municipality itself. Annotation 13 A.L.R.2d 1279, § 4. A property owner who is affected by the proceedings may attack the annexation. Idaho Falls v. Grimmett, 63 Idaho 90, 117 P.2d 461; Sharkey v. Butte, 52 Mont. 16, 155 P. 266; People ex rel. v. Hausen, 276 Ill. 204, 114 N.E. 596; McQuillin, 3rd Ed., §§ 7.41, 7.43, 20.19, 20.22; 62 C.J.S., Municipal Corporations, §§ 65, 66.
At the time of the adoption of the original zoning ordinance the defendant's land was not within the boundaries of the city. In October, 1948, a petition was filed with the city clerk which recites as follows: "The undersigned qualified voters in the territory hereinafter described, numbering more than 15% of the qualified voters voting in said territory at the last preceeding general election, hereby pray for the annexation of the following described territory to Boise City, Ada County, Idaho, to-wit:"
Then follows a description of the area to be annexed, which includes defendant's property. The minutes of the meeting of the council of October 26, 1948, recite as follows:
"Petitions for annexation to Boise City signed by 523 residents on the Whitney Bench Area was presented to the City Council, * * *.
"Moved by Burt seconded by Grim that the petitions be received and that November 12th, 1948, be the date set for holding an annexation election for a portion of Whitney Bench Area and that the South Jr. High School be the place designated for holding said election. Roll call on the motion resulted as follows: Yeas: Hardy, Grim and Burt. All votes being in the affirmative Mayor Howard declared the motion carried."
The clerk testified that he had no document entitled "Call for election," and that there are no other minutes, showing any further action by the mayor or council regarding the petition or the calling of the election. The notice of election, which was published as required by the charter, recites, among other things: "said petition being signed by more than fifteen per cent (15%) of the qualified voters of said territory voting therein at the last general election." The election was held and returns were made to and canvassed by the mayor and council. On November 15, 1948, a resolution was passed and approved declaring the lands described in the petition to be annexed to and within the territorial and corporate limits of the city.
The defendant by affirmative answer challenges the legality of the annexation proceedings, alleging that the procedure provided by the charter for the annexation of territory to the city was not complied with. Specifically it is urged that there was no determination by the council that the petition was signed by "at least fifteen per cent of the qualified voters" of the territory to be annexed "voting at the last preceding general election"; or that the council made a determination as to whether the annexation should be submitted to the voters; that the mayor did not join in a call for an election; and that no call for the election was ever made. All of these steps are required by the charter provisions governing annexation.
Appellant assigns as error the admission in evidence of the resolution annexing the territory to the city upon the same ground of failure to comply with the provisions of the charter in the annexation proceedings. This same objection was made to the admission of ordinance No. 2011, by which the zoning ordinances of the city were amended to extend "D Commercial" zone over a part of the territory annexed including the defendant's property. This ordinance was passed and approved February 14, 1949.
§ 9-315, I.C., provides:
"* * * official documents may be proved as follows:

* * * * * *
*306 "Acts of a municipal corporation of this state, or of a board or department thereof, by a copy, certified by the legal keeper thereof, or by a printed book, published by the authority of such corporation."
§ 50-2005, I.C., reads in part: "* * * and all such ordinances may be proved by the certificate of the clerk under the seal of the city or village, and when printed or published in book or pamphlet form by authority of the city or village, shall be read and received in evidence in all courts and places without further proof."
As against defendant's contention that these statutes are not applicable to a charter city, but that the charter governs admissibility, attention is called to the fact that these are rules of evidence for the government of the court, not the city. The resolution and ordinances here in question were authenticated as required and were properly admitted in evidence. Boise City v. Boise City Dev. Co., 41 Idaho 294, 238 P. 1006; State v. Clark, 47 Idaho 750, 278 P. 776; Idaho Falls v. Grimmett, 63 Idaho 90, 117 P.2d 461; State v. Poynter, 70 Idaho 438, 220 P.2d 386.
Ordinances and resolutions of a municipal corporation are presumed valid until the contrary is shown. The burden is on the party who attacks such an act to show the illegality thereof. Idaho Falls v. Grimmett, supra; Taos County Board of Ed. v. Sedillo, 44 N.M. 300, 101 P.2d 1027; Baxley v. City of Frederick, 133 Okl. 84, 271 P. 257; City of Spokane v. Coon, 3 Wash.2d 243, 100 P.2d 36; Hughes v. Carlsbad, 53 N.M. 150, 203 P.2d 995; Seifert v. City of Poplar Bluff, Mo.App., 112 S.W.2d 93; McQuillin, 3rd Ed., §§ 22.34, 24.31.
It is further presumed that the city officials complied with the requirements of the charter. People ex rel. Strong v. City of Whittier, 133 Cal.App. 316, 24 P. 2d 219; Peerless Realty & Operating Co. v. City of Tulsa, 184 Okl. 335, 87 P.2d 118; McQuillin, 3rd Ed., §§ 7.34, 7.44, 14.03.
Provisions of the statutes governing elections, in the absence of legislative expression to the contrary, are regarded as directory, unless it appears that a failure to comply may affect the result of the election. Sizemore v. Board of County Commissioners, 36 Idaho 184, 210 P. 137; King v. Independent School District, 46 Idaho 800, 272 P. 507. In Boyd v. Bickel, 13 Idaho 191, 89 P. 631, it was held that the method, provided by statute for determining the required number of petitioners, is directory. This court has held that statutory regulations as to the time and manner of giving notice of elections are mandatory in case of a direct attack upon the proceedings before the election is held, but that after the election such regulations are directory only, unless it appears that the electors have been prevented from giving a full and free expression of their will at the election, or unless the statute expressly makes compliance with its requirements a condition of the legality of the election. Weisgerber v. Nez Perce County, 33 Idaho 670, 197 P. 562; Harrison v. Board of County Commissioners, 68 Idaho 463, 198 P.2d 1013. Applying these rules to the objections made by the appellant, it will be presumed that the proper city officials determined that the petition was signed by the required number of qualified voters, and that the proposal should be submitted to the voters in the territory annexed. In fact, the minutes show that the council voted, "that the petitions be received," and that an election be held. This would seem equivalent to a finding that the petitions were sufficient, and that the proposal should be submitted to the voters. It also appears that the mayor participated in these proceedings, which would constitute a call for the election by the mayor and council. The defects are mere informalities rather than irregularities. The defendant made no attempt to show that the petition was insufficient, or that the election was in anywise affected.
Furthermore, this affirmative defense constitutes a collateral attack upon the validity of the proceedings, which could succeed only by proof that the annexation was void, or voidable for some jurisdictional defect. Hatch v. Consumers Co., 17 Idaho 204, 104 P. 670, 40 L.R.A.,N.S., 263; Biggerstaff v. City of Altus, 114 Okl. 98, 243 P. 751; Wichita Falls v. Bowen, *307 143 Tex. 45, 182 S.W.2d 695, 154 A.L.R. 1434; Annotation 13 A.L.R.2d 1279; McQuillin, 3rd Ed., § 7.41.
The next question raised is one of pleading. The complaint alleges: "That at all times since on or about November 1, 1949, and while the terms and provisions of said Title XIII of Boise City Code of 1936 and said ordinances specifically referred to herein were in full force and effect, the defendant, Better Homes, Inc., a corporation, in violation of said Title XIII of Boise City Code of 1936 and said ordinances, did construct on said above described premises of the said defendant and did use and operate and still continues to use and operate on said premises for the sale of lumber a certain lumber shed, and did also in violation of said ordinances file, store and sell lumber on said premises for such storing, piling and selling of lumber."
Defendant's answer to these allegations is a general denial. Upon the trial, the defendant sought to prove that it had used the property as a lumber yard prior to the effective date of the zoning restrictions. Plaintiff's objection to this offered proof was sustained on the ground that it constitutes an affirmative defense or "new matter," and was not affirmatively pleaded. Defendant thereupon asked leave to amend its answer to admit the operation of a lumber yard on its premises and to deny that such operation was in violation of the ordinance. The plaintiff objecting and claiming surprise, the court refused to permit defendant to amend.
New matter must be pleaded. § 5-612, I.C., "the test of whether matter is new is to be determined by the effect it has upon the issue presented by the complaint. If it controverts the cause of action, and tenders no new issue, it is a traverse. If, on the other hand, it introduces a new element by way of confession and avoidance, it is new matter, and must be pleaded affirmatively." Cupples v. Zupan, 35 Idaho 458, 207 P. 328, 329.
Other cases holding similarly are Stone v. Webster, 65 Idaho 392, 144 P.2d 466; Munn v. Mid-Continent Motor Sec. Co., 126 Okl. 241, 259 P. 249; Schmaling v. Johnston, 54 Nev. 293, 13 P.2d 1111; Wyman v. McCarthy, 93 Colo. 340, 26 P.2d 245; De-Santis v. Miller Petroleum Co., 29 Cal.App. 2d 679, 85 P.2d 489; Haveman v. Beulow, 36 Wash.2d 185, 217 P.2d 313, 19 A.L.R.2d 763; Bancroft's Code Pleading §§ 265, 266. In Smith v. Marley, 39 Idaho 779, 230 P. 769, 770, referring to new matter, it was said: "The latter class is again subdivided into those in which the `new matter' is simply defensive, and, if true, destroys or bars the plaintiff's right of action; and those in which the `new matter' is the statement of an independent cause of action in favor of the defendant against the plaintiff, * * *."
A general denial "goes to the root of the cause of action and permits the introduction of any proper evidence tending to controvert the facts which the plaintiff must establish to sustain his case." 41 Am.Jur., Pleading, § 366.
"Under a general denial, any evidence is admissible which contradicts, or directly tends to contradict, facts which the adverse party is bound or permitted to establish to sustain his claim or defense, or which shows, or tends directly to show, that the cause of action or defense asserted never existed, * * *." 71 C.J.S., Pleading, § 529.
The ordinance under which this action is prosecuted provides: "That a non-conforming use of occupancy existing at the time of the passage of this ordinance may be continued; but a non-conforming use of occupancy shall not be extended except with the approval of the board of adjustment as hereinafter provided." § 13-201, Boise City Code, 1936.
The city seeks to forbid the defendant to make what would otherwise be a legitimate use of its property. To justify such a restriction of the right of private property the city must allege and prove all facts necessary to establish a violation of the ordinance. It has the burden of showing not only that the restrictions were in effect in the area including defendant's property, but that the non-conforming use complained of did not exist at the time such restrictions became effective.
*308 The plaintiff contends that the allegation of its complaint that the use is in violation of the ordinance is a conclusion of law, and that the denial of such a conclusion raises no issue. Further, that the general denial of its allegations that since on or about November 1, 1949, the defendant did construct, use and operate and continues to use and operate on said premises a lumber shed, and pile, store and sell lumber thereon, denies only that the defendant has engaged in the non-conforming use. This argument begs the question. To state a cause of action the plaintiff must allege and prove that the non-conforming use did not exist when the restriction became effective. O'Connor v. City of Moscow, 69 Idaho 37, 204 P.2d 401, 9 A.L.R.2d 1031. The quoted allegations of the complaint, although ambiguous, must be construed to allege that the use commenced after the effective date of the restrictions. The general denial, therefore, put in issue the question of the prior existence of the nonconforming use.
As to plaintiff's claim of surprise, it is sufficient to note that in its case in chief the plaintiff offered evidence as to when the lumber yard business commenced, as it was required to do. There was no showing to support the assertion of surprise and the plaintiff, by its ambiguous pleading, helped to create the situation out of which the claim of surprise arose. It was error to exclude the evidence offered by the defendant as to when its use was established.
The zoning ordinance became effective as to defendant's property upon the date of the annexation, November 15, 1948. § 4, Bosie City Charter, 1907 Session Laws, p. 62; Highland Park v. Calder, 269 Ill. App. 255; Western Gas v. Bremerton, 21 Wash.2d 907, 153 P.2d 846. Upon that date the property became subject to "A Residence" zone restrictions (Boise City Code 1936 § 13-102) which do not permit lumber yard use. (§ 13-108.) Likewise, the lumber yard use is not permitted in "D Commercial" zone (§ 13-115) extended to this property by the amendment of February 14, 1949.
The judgment is reversed and cause is remanded with directions to permit both parties to offer further evidence on the issue as to whether or not the use complained of existed prior to the effective date of the zoning restrictions, to make findings and enter judgment thereon.
Costs to appellant.
PORTER and KEETON, JJ., and BAKER and ANDERSON, Dist. JJ., concur.
