No marriage shall be valid unless solemnized by either:
United States court of international trade, a federal administrative law judge presiding in this state, a judge or justice of the unified court system of this state, a housing judge of the civil court of the city of New York, or a retired judge or justice of the unified court system or a retired housing judge of the civil court certified pursuant to paragraph (k) of subdivision two of section two hundred twelve of the judiciary law, nor by any of the persons specified in subdivision three-a of this section, outside the territorial jurisdiction in which he or she was elected , appointed or duly designated. Such a public officer, however, elected or appointed within the city of New York may solemnize a marriage anywhere within such city.
N.Y. Dom. Rel. Law § 11