Any candidate whose name appears on the ballots used in any ward of the city at any election for alderperson , may contest the election of the candidate who appears to be elected from such ward on the face of the returns, or may contest the right of the candidates who appear to have received the highest and second highest number of votes to places on the official ballot at any supplementary election, by filing within 5 days after such election with the Clerk of the Circuit Court of Cook County, a complaint in writing, verified by the candidate making the contest, setting forth the grounds of the contest. The contestant in each contest shall also serve notice on all persons who were candidates for alderperson of such ward at the election, within such 5 days, informing them that such complaint has been or will be filed. The Circuit Court of Cook County shall have jurisdiction to hear and determine such contest. All proceedings in relation to such contest after the filing of such complaint shall be the same, as near as may be, as provided for in the case of a contest at a primary election in such city. In case the court shall decide that the complaint is insufficient in law, or that the candidate who appears to have been elected on the face of the return has been duly elected, the complaint shall be dismissed. If it shall appear to the satisfaction of the court that the face of the returns are not correct, and that the candidate who appears thereby to have been elected was not in fact elected, then the candidates having the highest and second highest number of votes as determined by such contest shall be candidates at the subsequent supplementary election as provided for in section 21-26.
65 ILCS 20/21-27