A proceeding for the examination before a magistrate of a person on a charge of a felony must be commenced by written complaint under oath subscribed by the complainant and filed with the magistrate. Such complaint may be verified on information and belief. When the complaint is used as a pleading to which the defendant pleads guilty under Section 859a of this code, the complaint shall contain the same allegations, including the charge of prior conviction or convictions of crime, as are required for indictments and informations and, wherever applicable, shall be construed and shall have substantially the same effect as provided in this code for indictments and informations.
Ca. Pen. Code § 806