The mayor or candidate therefore, at the date of candidacy and election or appointment, shall be an elector and a resident of the city not less than 30 days prior to the date of candidacy and election or appointment, as the case may be, and shall continue to reside in the city during the term of office. The term "elector" shall have the meaning given in Section 27 of Article III. "Date of candidacy" shall mean the date of filing nomination papers or equivalent declaration or candidacy.