Only an unsuccessful candidate whose name appeared on the ballot in the general election to represent a legislative district as a member of the Legislature may contest the election or challenge the qualifications of the person elected as a member of the Legislature to represent that legislative district.