This is VA code section on it.
§ 18.2-282. Pointing, holding, or brandishing firearm or object similar in appearance; penalty.
A. It shall be unlawful for any person to point, hold or brandish any firearm, as hereinafter described, or any object similar in appearance to a firearm, whether capable of being fired or not,[red] in such manner as to reasonably induce fear in the mind of another or hold a firearm in a public place in such a manner as to reasonably induce fear in the mind of another of being shot or injured[/red]. [blue]However, this section shall not apply to any person engaged in excusable or justifiable self-defense[/blue]. Persons violating the provisions of this section shall be guilty of a Class 1 misdemeanor or, if the violation occurs upon any public, private or parochial elementary, middle or high school, including buildings and grounds or upon public property within 1,000 feet of such school property, he shall be guilty of a Class 6 felony.
B. Any police officer in the performance of his duty, in making an arrest under the provisions of this section, shall not be civilly liable in damages for injuries or death resulting to the person being arrested if he had reason to believe that the person being arrested was pointing, holding, or brandishing such firearm, or object which was similar in appearance to a firearm, with intent to induce fear in the mind of another.
C. For purposes of this section, the word "firearm" shall mean any weapon in which ammunition may be used or discharged by explosion or pneumatic pressure. The word "ammunition," as used herein, shall mean a cartridge, pellet, ball, missile or projectile adapted for use in a firearm.
I think the highlighted area is the key part.