A candidate for a city office must be an elector and must have been a resident of the city for at least one year immediately preceding the election that results in election to the office. A candidate for city office must be registered to vote as a resident of the city at the time his or her nominating petition is submitted to the city recorder. A candidate for city office shall maintain his or her residence within the city and the area he or she seeks to represent at the time of nomination and throughout his or her term of office if elected. If a city official or candidate for city office fails to maintain his or her residence within the city and the area he or she represents or seeks to represent, he or she shall be removed from office or be ineligible to serve as a city official. The vacancy thus created shall be filled in the manner other vacancies in that office are filled. If a city official or candidate for city office has more than one residence, the requirements of this section apply to the principal place of residency, which is the residence where the city official or candidate for city office spends more than 50% of his or her time.