(a) A court conducting a trial de novo based on an appeal from a justice or municipal court may dismiss the case because of a defect in the complaint only if the defendant objected to the defect before the trial began in the justice or municipal court.
(b) The attorney representing the state may move to amend a defective complaint before the trial de novo begins.