A person is not eligible to hold office as mayor unless he or she is at the time of assuming that office an elector of the city, and was a registered voter of the city at the time nomination papers are issued to the candidate as provided for in Section 10227 of the Elections Code.