Notwithstanding the provisions of §§ 2.2-3100 through 2.2-3127, any locality may adopt an ordinance which permits law-enforcement officers and deputy sheriffs in such locality to engage in off-duty employment which may occasionally require the use of their police powers in the performance of such employment. Such ordinance may include reasonable rules to apply to such off-duty employment, or it may delegate the promulgation of such reasonable rules to the chief of the respective police departments or the sheriff of the county or city.
Va. Code § 15.2-1712