If any officer, for performing an official duty for which a fee or compensation is allowed or provided by law, knowingly demand and receive a greater fee or compensation than is so allowed or provided, he shall be guilty of a Class 4 misdemeanor.
Va. Code § 18.2-470