Any eligible voter, including a candidate, may contest in the manner provided in this chapter: (1) the nomination or election of any person for whom the voter had the right to vote if that person is declared nominated or elected to the senate or the house of representatives of the United States, or to a statewide, county, legislative, municipal, school, or district court office; or (2) the declare