Gun Free Zone
I believe the federal law exists only in case the state does not create their own law.
Clearly, Virginia has a law on the books that allows guns on school property while it is in contradiction with of federal law.
The Federal Gun Free School Zone Act of 1990 severely limits where a person may legally carry a firearm by generally prohibiting carry within one-thousand (1000) feet of the property-line of any K-12 school in the nation. A State-issued permit to carry may exempt a person from this restriction depending on the laws of the State, and most issuing States qualify for this exception. However, according to ATF the exemption in Federal law is only applicable to permit holders while in the issuing State, and does not exempt travelers with out-of-state permits, even though the State may honor their permit through reciprocity agreements.
Source
§ 18.2-308.1. Possession of firearm, stun weapon, or other weapon on school property prohibited.
A. If any person possesses any (i) stun weapon as defined in this section; (ii) knife, except a pocket knife having a folding metal blade of less than three inches; or (iii) weapon, including a weapon of like kind, designated in subsection A of § 18.2-308, other than a firearm; upon (a) the property of any public, private or religious elementary, middle or high school, including buildings and grounds; (b) that portion of any property open to the public and then exclusively used for school-sponsored functions or extracurricular activities while such functions or activities are taking place; or (c) any school bus owned or operated by any such school, he shall be guilty of a Class 1 misdemeanor.
B. If any person possesses any firearm designed or intended to expel a projectile by action of an explosion of a combustible material while such person is upon (i) any public, private or religious elementary, middle or high school, including buildings and grounds; (ii) that portion of any property open to the public and then exclusively used for school-sponsored functions or extracurricular activities while such functions or activities are taking place; or (iii) any school bus owned or operated by any such school, he shall be guilty of a Class 6 felony.
C. If any person possesses any firearm designed or intended to expel a projectile by action of an explosion of a combustible material within a public, private or religious elementary, middle or high school building and intends to use, or attempts to use, such firearm, or displays such weapon in a threatening manner, such person shall be guilty of a Class 6 felony and sentenced to a mandatory minimum term of imprisonment of five years to be served consecutively with any other sentence.
The exemptions set out in § 18.2-308 shall apply, mutatis mutandis, to the provisions of this section. The provisions of this section shall not apply to
(i) persons who possess such weapon or weapons as a part of the school's curriculum or activities;
(ii) a person possessing a knife customarily used for food preparation or service and using it for such purpose;
(iii) persons who possess such weapon or weapons as a part of any program sponsored or facilitated by either the school or any organization authorized by the school to conduct its programs either on or off the school premises; (iv) any law-enforcement officer;
(v) any person who possesses a knife or blade which he uses customarily in his trade;
(vi) a person who possesses an unloaded firearm that is in a closed container, or a knife having a metal blade, in or upon a motor vehicle, or an unloaded shotgun or rifle in a firearms rack in or upon a motor vehicle; or
(vii) a person who has a valid concealed handgun permit and possesses a concealed handgun while in a motor vehicle in a parking lot, traffic circle, or other means of vehicular ingress or egress to the school. For the purposes of this paragraph, "weapon" includes a knife having a metal blade of three inches or longer and "closed container" includes a locked vehicle trunk.
Source