No person shall be eligible to hold the office of mayor in said city unless he is twenty-one years old, a qualified elector of the City of Twin City, and shall have resided in the city for a period of two years immediately preceding his election.