Councilman, Mayor. In order to be eligible to be elected as a councilman or as mayor of the city, a candidate must ·be a resident and qualified and duly registered elector -of the city on the date he qualifies to run for office, and at the time of election thereto.