Whenever the constitutionality of any local law, ordinance, rule or regulation of a county is brought into issue upon a trial or hearing of any civil cause of action or proceeding in any court, and the county is not a party to such action or proceeding, notice shall be served upon the county in accordance with section one thousand twelve of the civil practice law and rules.
N.Y. County Law § 234-A