Increasingly over the past decade, persons charged with violations of "unconstitutional" federal or state statutes have sought to obtain equitable relief in the federal courts. Most often, the relief sought has been in the form of an injunction restraining the government from prosecuting or threatening to prosecute under the allegedly invalid statute. Declaratory relief (that the statute is, in fact, unconstitutional) has often been sought as an additional or alternative remedy.
Bruce E. Gaynor,
Federal Injunctions and State Criminal Prosecutions: Vestiges of Our Federalism,
21 Clev. St. L. Rev.
available at https://engagedscholarship.csuohio.edu/clevstlrev/vol21/iss1/18