An information or complaint shall not contain any allegations whatsoever of former convictions of the defendant, except when an allegation to that effect is a material ingredient of the offense, or to allege the condition of second offender or of habitual offender in relation to the defendant.