OPINION OF THE COURT
Denman, J.On December 20, 1976 the Onondaga Town Board enacted subdivision (K) of section 3 of article II of its Code of Ethics (Local Laws, 1970, No. 3 of Town of Onondaga, as amd by Local Law No. 4 of 1976), to become effective January 1, 1977. As amended the code provides as follows: "No town officer or employee or any member of the Town Board; Planning Board; Zoning Board of Appeals or any other Town administrative board, commission or agency shall be a political committeeman or committeewoman or the Chairman or Vice-Chairman of a political party.”
On the effective date of the ordinance petitioner Suzanne W. *355Belle was Vice-Chairman of the Republican Town Committee of Onondaga, Republican Committeewoman from the Fourteenth Election District of the Town of Onondaga, and a member of the Town of Onondaga Zoning Board of Appeals. Petitioner Anthony A. Malfitano was Chairman of the Republican Town Committee of the Town of Onondaga and Chairman of the Town of Onondaga Zoning Board of Appeals. Petitioners continued to hold their positions on the zoning board of appeals until March 7, 1977 when they were removed following a public hearing.
Petitioners commenced this article 78 proceeding alleging that their removal from office violated their statutory and constitutional rights and alleging that respondents’ actions were arbitrary, capricious, an abuse of discretion and not supported by substantial evidence. Supreme Court, Onondaga County, ruled in petitioners’ favor, finding that the Town Board of the Town of Onondaga lacked authority to enact ethical provisions limiting the political activity of its officers and employees, and that the ordinance itself is unconstitutionally overbroad in violation of the First and Fourteenth Amendments.
Respondent Town of Onondaga ("Town”) urges that an article 78 proceeding is not an appropriate method of reviewing the constitutionality of a legislative enactment of the town board ("Board”). Whereas generally an article 78 proceeding is not the proper method to test the constitutionality of a legislative enactment (Matter of Kovarsky v Housing & Dev. Admin, of City of N. Y., 31 NY2d 184; Matter of Lakeland Water Dist. v Onondaga County Water Auth., 24 NY2d 400), it is an appropriate method of collaterally attacking an administrative action threatened or taken pursuant to an allegedly invalid law (Matter of Roosevelt Raceway v County of Nassau, 18 NY2d 30, 41, app dsmd 385 US 453; Matter of Diocese of Rochester v Planning Bd. of Town of Brighton, 1 NY2d 508, 519-520; Matter of Elefante v Hanna, 54 AD2d 822, mod on other grounds 40 NY2d 908; Matter of Policemen’s Benevolent Assn. of Westchester County v Board of Trustees of Vil. of Croton-on-Hudson, 21 AD2d 693; see, also, Matter of Fritz v Huntington Hosp., 39 NY2d 339; Matter of First Nat. City Bank v City of New York Fin. Admin., 36 NY2d 87).
We turn then to the question of whether the Board exceeded its authority in passing legislation which prohibited town officers, employees and board members from holding *356office in a political party. Subdivision (c) of section 2 of article IX of the State Constitution reserves to local governments the right to enact local laws which are not inconsistent with the provisions of the Constitution or of general law of the State which relate either to the municipality’s property, affairs or government, or which relate to specific subjects including "the powers, duties, qualifications, number, mode of selection and removal, terms of office, compensation, hours of work, protection, welfare and safety of its officers and employees.” (NY Const, art IX § 2, subd [c], par [1].) Implementing that provision, subdivision 1 of section 10 of the Municipal Home Rule Law in similar terms, prohibits municipalities from adopting local laws inconsistent with the State Constitution and the general laws of the State.
As a general proposition, local laws which do not prohibit what the State law permits nor allow what the State law forbids are not inconsistent (People v Lewis, 295 NY 42; Wholesale Laundry Bd. of Trade v City of New York, 17 AD2d 327, 330, affd 12 NY2d 998). Given its broadest application, this limitation on local lawmaking could be construed as prohibiting municipal regulation of matters upon which the State Constitution and general laws are silent. Such an interpretation contravenes the right to legislate on matters of local concern reserved to municipalities under section 1 of article IX of the Constitution. Consequently, a "pre-emption doctrine” has evolved which precludes local legislation in subject areas marked by a pervasive scheme of State legislation. (People v Judiz, 38 NY2d 529, 532; People v Cook, 34 NY2d 100, 109; Wholesale Laundry Bd. v City of New York, supra, p 330.)
"The mere fact that a local law may deal with some of the same matters touched upon by State law does not render the local law invalid * * * It is only when the State has evidenced a desire or design to occupy an entire field to the exclusion of local law that the city is powerless to act.” (Citations omitted.) (People v Judiz, supra, pp 531-532.)
In the case at bar the State has clearly expressed an intention not to occupy the field of ethical standards for officers and employees of local governments. Subdivision 1 of section 806 of the General Municipal Law provides as follows: "The governing body of each county, city, town, village and school district shall and the governing body of any other municipality may by local law, ordinance or resolution adopt a code of ethics setting forth for the guidance of its officers and *357employees the standards of conduct reasonably expected of them. Such code shall provide standards for officers and employees with respect to disclosure of interest in legislation before the local governing body, holding of investments in conflict with official duties, private employment in conflict with official duties, future employment and such other standards relating to the conduct of officers and employees as may be deemed advisable. Such codes may regulate or prescribe conduct which is not expressly prohibited by this article but may not authorize conduct otherwise prohibited. Such codes may provide for the prohibition of conduct or disclosure of information and the classification of employees or officers.” (Emphasis added.)
In indorsing a localized approach, the Legislature adopted the recommendations, of the law’s proponents who rejected a pervasive State-wide scheme in favor of municipal diversity.
"By mandating the adoption of a code of ethics, each of these municipalities will be required to take a close look at itself and evaluate its past and present practices. Sufficient flexibility is provided so that each municipality can adapt its code to its particular needs or circumstances * * * [and] * * * deal with other matters as the municipality may find appropriate.
"In formulating these rules, municipalities could either require disclosures or prohibit conduct and could draw distinctions among classes of officers and employees where appropriate. While full leeway is given to municipalities as to how to deal with these issues, they must be faced and the decision as to how they are faced will be subject to public opinion.” (Report of the Governor’s Special Commission on Ethical Standards in Public Service, 1969, pp 5-6.) (Emphasis added.)
An ethics code provision enacted by a municipality which prohibits what may be permissible under general law represents the kind of local initiative that section 806 of the General Municipal Law was designed to encourage. Although the local provision may be "different”, it is not necessarily "inconsistent” if it is neither contradictory, incompatible nor inharmonious with State law. (Town of Clifton Park v C. P. Enterprises, 45 AD2d 96, 97-98.) Hence, the local provision should be sustained if it beárs a "substantial relation to matters within the field where legislative power is vested in the local legislative body * * * by the Constitution and the statutes of New York * * * [and is] * * * reasonably calcu*358lated to achieve a legitimate public purpose.” (Good Humor Corp. v City of New York, 290 NY 312, 317.) (See, also, People v Cook, 34 NY2d 100, 107-108.)
It cannot be gainsaid that regulation and promulgation of ethical standards for public employees serve a legitimate public purpose. Moreover, restrictions on the partisan political activity of public officers in this State have been sustained as necessary and proper methods of maintaining public confidence in government. See Boyle v Kirwin, (39 AD2d 993, State troopers barred from holding public or political office); Matter of Lecci v Looney (33 AD2d 916, mot for lv to app den 26 NY2d 612, police officers prohibited from taking active part in any movement for the nomination or election of candidates for political office or public office); People ex rel. Clifford v Scannell (74 App Div 406, affd 173 NY 606, firemen prohibited from contributing to or joining policital club or organization); Rogers v Common Council of City of Buffalo (123 NY 173, barring more than two Civil Service Commissioners from being members of same political party); Public Officers Law (§ 73, subd 8, prohibiting member of a national committee, an officer or member of a State committee or a county chairman of any political party from serving as a Judge, AttorneyGenéral, District Attorney, or Assistant District Attorney).
Consequently, we find that municipalities possess ample authority under subdivision 1 of section 806 of the General Municipal Law to enact local laws restricting municipal officers, employees and board members from holding offices in political parties. Subdivision (K) of section 3 of article II of the Town Code of Ethics is consistent with the Constitution and laws of the State and exemplifies the laudable tradition of encouraging public confidence in government processes and decision making.
Petitioners’ contention that the prohibition on their political activities is in contravention of their constitutional rights under the First and Fourteenth Amendments is not tenable in view of the decisions of the Supreme Court of the United States in United States Civ. Serv. Comm, v National Assn. of Letter Carriers, AFL-CIO (413 US 548) and Broadrick v Oklahoma (413 US 601). Letter Carriers reaffirmed the authority of the Federal Government to prohibit its officers and employees from engaging in political activity or making political contributions. Broadrick reaffirmed the parallel au*359thority State governments possess to prohibit broad categories of employees from taking active roles in organized political activity. Acknowledging that the statute was "directed, by its terms, at political expression which if engaged in by private persons would plainly be protected by the First and Fourteenth Amendments”, the court stated that, "there is no question that * * * [it] * * * is valid * * * insofar as it forbids classified employees from * * * becoming members of national, state or local committees of political parties” (Broadrick v Oklahoma, supra, p 616). "Employees of state and local governments may be subject to a Tittle Hatch Act’ designed to ensure that government operates effectively and fairly, that public confidence in government is not undermined, and that government employees do not become a powerful political machine controlled by incumbent officials.” (Abood v Detroit Bd. of Educ., 431 US 209, 230, n 27.)
In view of the validity of subdivision (K) of section 3 of article II of the Code of Ethics of the Town óf Onondaga, petitioners’ violation thereof forms the basis for removal for cause pursuant to section 267 of the Town Law. (See Matter of Merrin v Town Bd. of Town of Kirkwood, 48 AD2d 992; Matter of Zeidler v Board of Supervisors of County of Suffolk, 35 AD2d 54.)
Trial Term did not consider the issue of whether or not petitioners’ removals were based on substantial evidence. Nevertheless, petitioners admitted that they are respectively the Vice-Chairman and Chairman of the Republican Town Committee of the Town of Onondaga. Inasmuch as the holding of those positions is a clear violation of subdivision (K) of section 3 of article II, and inasmuch as a question of substantial evidence may be considered by this court (CPLR 7804, subd [g]), the determination of the town board is confirmed.
The judgment should, therefore, be reversed, the petition dismissed and the determination by the Town Board of the Town of Onondaga, removing petitioners from the zoning board of appeals, confirmed.
Marsh, P. J., Cardamone and Wither, JJ., concur.
Judgment unanimously reversed, without costs, petition dismissed, and determination confirmed.