Any elector of a county, city, or of any political subdivision of either may contest any election held therein, for any of the following causes:
(a)
That the precinct board or any member thereof was guilty of malconduct.
(b)
That the person who has been declared elected to an office was not, at the time of the election, eligible to that office.
(c)
That the defendant has given to any elector or member of a precinct board any bribe or reward, or has offered any bribe or reward for the purpose of procuring his election, or has committed any other offense against the elective franchise defined in Division 18 (commencing with Section 18000).
(d)
That illegal votes were cast.
(e)
That eligible voters who attempted to vote in accordance with the laws of the state were denied their right to vote.
(f)
That the precinct board in conducting the election or in canvassing the returns, made errors sufficient to change the result of the election as to any person who has been declared elected.
(g)
That there was an error in the vote-counting programs or summation of ballot counts.