OPINION OF THE COURT
Memorandum.
Order affirmed.
Defendant was charged in multiple informations with violating section 2-103 of the Code of the Town of North Hempstead in that he allegedly rented the premises set forth in said informations without first obtaining the required rental permits therefor.
Prior to trial, defendant filed a motion for omnibus relief seeking, inter alia, that the informations be dismissed on the ground that the ordinance’s requirement that the owner disclose the names, ages and relationships of the occupants was unconstitutional since it violated the tenants’ right to privacy. The court (Samuel Levine, J.) abstained from ruling on the constitutional challenge. Defendant and his tenants then filed a declaratory judgment action in Supreme Court, Nassau County (Anthony v Town of N. Hempstead) on December 6, 1999 requesting that several relevant sections of the Code be declared unconstitutional. The criminal proceeding was stayed during the pendency of the declaratory judgment action. By order dated January 6, 2003, Justice Joseph DeMaro granted the Town of North Hempstead’s cross motion for summary judgment dismissing the declaratory judgment action. The plaintiffs therein (including the defendant herein) appealed. On March 28, 2003, during the pendency of the appeal, defendant pleaded guilty to seven of the charges (the others were dismissed) and waived his right to appeal. Subsequent thereto, on December 1, 2003, the Appellate Division, Second Department, reversed the *56Supreme Court order and declared section 2-104 (B) (3) and section 2-113 of the Code of the Town of North Hempstead unconstitutional as violative of the tenants’ right to privacy (Anthony v Town of N. Hempstead, 2 AD3d 378 [2003]). However, the Appellate Division did not rule on the constitutionality of the subject provision, Code of the Town of North Hempstead (Housing Code) § 2-103, noting that the constitutionality of said section had not been raised in the court below and thus was not before it. Several months later, defendant moved in District Court to vacate the judgments of conviction contending that the court did not have jurisdiction over the proceedings and that the judgments were obtained in violation of defendant’s constitutional rights (see CPL 440.10 [1] [a], [h]). Following denial of defendant’s motion, leave to appeal therefrom was granted.
Defendant raised the constitutionality of section 2-103 in the court below prior to pleading guilty and the court abstained from ruling on it. Although in pleading guilty defendant waived his right to appeal, such guilty plea and waiver did not foreclose defendant’s right to appeal on the ground that the statute that he violated was unconstitutional (see People v Lopez, 6 NY3d 248 [2006]; People v Hansen, 95 NY2d 227, 230 [2000]; People v Beaumont, 299 AD2d 657 [2002]). Defendant failed to take a direct appeal from the judgments of conviction, in which he could have raised the constitutionality of section 2-103 regardless of the procedural posture of the declaratory judgment action. He thereby forfeited review of that issue and, thus, the lower court was required to deny the instant motion to vacate the judgments (see CPL 440.10 [2] [c]).
We note that the declaratory judgment action in Supreme Court and the subsequent appeal to the Appellate Division ultimately have no bearing upon the disposition of the instant case.