If any executive, legislative or judicial officer, sheriff or police officer, or any candidate for such office, accept in this Commonwealth, or if, being resident in this Commonwealth, such officer or candidate shall go out of this Commonwealth and accept and afterwards return to and reside in this Commonwealth, any gift or gratuity or any promise to make a gift or do any act beneficial to such officer or candidate under an agreement, or with an understanding, that his vote, opinion or judgment shall be given on any particular side of any question, cause or proceeding which is or may be by law brought before him in his official capacity or that in such capacity he shall make any particular nomination or appointment or take or fail to take any particular action or perform any duty required by law, he shall be guilty of a Class 4 felony and shall forfeit his office and be forever incapable of holding any office of honor, profit or trust under the Constitution of Virginia. The word candidate as used in this section and § 18.2-438, shall mean anyone who has filed his candidacy with the appropriate electoral official or who is a candidate as defined in § 24.2-101.
Va. Code § 18.2-439