
569 N.W.2d 605 (1997)
STATE of Iowa, Appellee,
v.
Kimberly Sue McCRIGHT, Appellant.
No. 96-1694.
Supreme Court of Iowa.
October 22, 1997.
*606 Linda Del Gallo, State Appellate Defender, and Shellie L. Knipfer, Assistant State Appellate Defender, for appellant.
Thomas J. Miller, Attorney General, Mary Tabor, Assistant Attorney General, Denver D. Dillard, County Attorney, and Theresa Seeberger, Assistant County Attorney, for appellee.
Considered by LARSON, P.J., and CARTER, LAVORATO, NEUMAN, and SNELL, JJ.
LAVORATO, Justice.
Kimberly Sue McCright pleaded guilty to possession of a controlled substance in violation of Iowa Code section 124.401(3) (1995). Pursuant to 1996 Iowa Acts chapter 1218, section 68, the district court revoked McCright's license to drive for 180 days. McCright appeals her sentence claiming section 68, later codified at Iowa Code section 901.5(10) (1997), violated the single subject requirement of article III, section 29 of the Iowa Constitution. We agree with the State that McCright failed to preserve error on this issue. We therefore affirm.

I. Background Facts and Proceedings.

In a trial information, the State charged McCright on July 1, 1996, with violating Iowa Code section 124.401(3) for possession of a controlled substance. On August 29, in a written document, McCright withdrew her former plea of not guilty, entered a plea of guilty, waived her rights, waived presence at the plea and sentence, asked for immediate sentence, and waived her right to file a motion in arrest of judgment. See Iowa Rs. Crim. P. 8, 9. The same day, the district court accepted the written plea, found McCright guilty of the offense charged, and sentenced her. McCright was not present at this proceeding, but her lawyer was.
The court fined McCright $250, plus a 30% surcharge and court costs. The court also revoked McCright's license to drive for 180 days.
On September 23 McCright "specifically appeal[ed] that portion of the sentencing order which revokes her driving privileges for 180 days." McCright contends the district court erred in revoking her driver's license because the House File pursuant to which her license was revoked violates the single subject requirement of article III, section 29 of the Iowa Constitution. The State responds McCright failed to preserve error on this issue because she did not raise it in the district court.

II. Error Preservation.

A. 1996 Iowa Acts chapter 1218. The statute under which McCright's license to drive was revoked began life as House File 2421. It was enacted as part of chapter 1218 AppropriationsTransportation, Infrastructure, and Capital Projects. 1996 Iowa Acts ch. 1218. The title reads:
AN ACT relating to and making appropriations to the state department of transportation including allocation and use of moneys from the general fund, road use tax *607 fund, and primary road fund, making appropriations for capital projects from the rebuild Iowa infrastructure fund, providing for certain procedures for revocation or suspension of drivers licenses for certain drug-related offenses, construction projects for the commission of veterans affairs, county fairs, recreational trails, and nonreversion of certain appropriations, and providing an effective date.
Id. (emphasis added).
The Act contained seventy-two sections, divided into six divisions. Divisions I through IV authorized appropriations for among other things (1) railroads, (2) building construction at Iowa State University, (3) construction of a rural heritage center, (4) erection or restoration of veterans' memorials, (5) purchase of computer software, (6) maintenance of National Guard Facilities, (7) acquiring and improving recreational trails, (8) renovating buildings and stands at the fairgrounds, (9) granting money to the county fairs, (10) developing a capitol view preservation plan, (11) soydiesel projects, and (12) developing a physical infrastructure financial assistance program.
Division Vthe one at issue herewas a criminal sentencing provision authorizing suspension or revocation of a person's driver's license upon conviction for certain controlled substance or drug-related offenses such as the one involved in this case.
The last division, Division VI, provided for an effective date of the act.
B. Codification as cure for constitutional defect. Following the lead of a number of jurisdictions, we held that codification of new legislation cures any alleged constitutional defect in title or subject matter. State v. Mabry, 460 N.W.2d 472, 475 (Iowa 1990). In so holding we left open a window of time for challenging legislation on the grounds of title or subject defects:
Iowa Code section 14.15 governs codification of new legislation in this state. This section provides in part:
A new Code or its supplements shall be issued as soon as possible after the final adjournment of the second regular session of the general assembly.
Section 14.15 provides a window of time measured from the date legislation is passed until such legislation is codified. During this window of time, the legislation may be challenged as violative of article III, section 29 of the Iowa Constitution. Absent a successful challenge during this period of time, the new legislation, if it is otherwise constitutional, becomes a valid law. This is so even though the way the new legislation was passed may have violated article III, section 29 of the Iowa Constitution. And an article III, section 29 challenge is barred even though future litigants may claim they were in no position to make such a challenge before the codification.
Id. A successful challenge before codification invalidates the defective portion of the legislation not only for the benefit of the challenger but also for the benefit of others adversely affected. Tabor v. State, 519 N.W.2d 378, 380 (Iowa 1994).
Chapter 1218 was signed into law on May 30, 1996. That part of the chapter dealing with the challenged sentencing provision was codified at Iowa Code section 901.5(10) in January 1997. McCright's notice of appeal challenging the revocation of her driver's license was filed on September 23, 1996, arguably within the window of time for an article III, section 29 challenge. That leaves for our consideration the lack-of-error-preservation argument the State raises.
C. The merits on error preservation. Issues not raised before the district court, including constitutional issues, cannot be raised for the first time on appeal. State v. Wages, 483 N.W.2d 325, 326 (Iowa 1992). A party challenging a statute on constitutional grounds must do so at the earliest available time in the progress of the case. State v. Allen, 304 N.W.2d 203, 206 (Iowa 1981). A failure to make the challenge in a timely manner leaves nothing for the appellate courts to review. In short, we do not recognize a "plain error" rule which allows appellate review of constitutional challenges not preserved at the district court level in a proper and timely manner. State v. Hutchison, 341 N.W.2d 33, 38-40 (Iowa 1983).
*608 Our error preservation rule serves the salutary purpose of giving notice to the court and opposing counsel. State v. Johnson, 476 N.W.2d 330, 334 (Iowa 1991). Requiring objections at the earliest possible time gives the district court the opportunity "to take any necessary corrective action at a time when correction is still possible." Id.
McCright attempts to avoid the consequences of her failure to raise in the district court an article III, section 29 challenge to the statute by characterizing the sentence as an "illegal" one. It is true that the error preservation rule is not applicable to illegal sentences. Overton v. State, 493 N.W.2d 857, 859 (Iowa 1992). An illegal sentence is one not authorized by statute and is therefore void. Id.
McCright mischaracterizes the revocation of her driver's license as an illegal sentence because Iowa Code section 901.5(10) not only authorizes the revocation but makes the revocation mandatory. See Iowa Code § 901.5(10) ("[T]he court shall order the state department of transportation to revoke the defendant's driver's license ... for ... one hundred eighty days...."). The provision remains effective unless and until someone successfully challenges it within the narrow window of time allowed by Mabry. See Mabry, 460 N.W.2d at 475; accord Tabor, 519 N.W.2d at 380. If no such successful challenge is made, the revocation provision is no longer subject to attack based on an article III, section 29 challenge. Mabry, 460 N.W.2d at 475. Therefore the revocation provision is not void even though it may have been subject to such a constitutional challenge. See Black's Law Dictionary 1574 (6th ed. 1990) (A void judgment means "[o]ne which has no legal force or effect, [the] invalidity of which may be asserted by any person whose rights are affected at any time and at any place directly or collaterally."). Because the revocation portion of McCright's sentence was not an illegal sentence, any challenge to the sentence was subject to our error preservation rule.
McCright also argues that the error preservation rule should not apply because there was no way to raise the issue before sentencing as she did not know the court would revoke her driver's license. We are not persuaded.
As we mentioned, the statute is clear that the revocation is mandatory. Compare Iowa Code § 901.5(10) ("[T]he court shall order the state department of transportation to revoke the defendant's driver's license ... for ... one hundred eighty days ...."), with id. § 4.30(a) ("The word `shall' imposes a duty."). McCright therefore knew or should have known her license would be suspended. The article III, section 29 challenge here poses a purely legal question which is appropriate for resolution in a motion to adjudicate law points. See Iowa R. Civ. P. 105 (providing for motion to adjudicate law points); Iowa R.Crim. P. 10(2) ("Any defense, objection, or request which is capable of determination without the trial of the general issue may be raised before trial by motion."); State v. Iowa Dist. Ct., 271 N.W.2d 704, 706 (Iowa 1978) (holding Iowa Rule of Criminal Procedure 10(2) provides criminal procedure for adjudication of law points before trial similar to Iowa Rule of Civil Procedure 105); accord State v. Marti, 290 N.W.2d 570, 580 (Iowa 1980) (holding Iowa Rule of Civil Procedure 105's limitations on the authority of trial courts for making pretrial rulings on law points applies to Iowa Rule of Criminal Procedure 10(2) motions in criminal cases). In these circumstances, the earliest available time to challenge the statute was before sentencing in a pretrial motion under rule 10(2).
Because McCright did not raise the constitutional challenge in the district court, she has preserved no error and we have nothing to review.
AFFIRMED.
