Any length of service by any individual in the Armed Forces of the United States as an officer, private, or nurse or in any other capacity in time of war or other declared national emergency is a complete and final discharge of any obligation of such individual to serve the Commonwealth as a teacher in the public schools or in any other capacity, including any such obligation that has been reduced or computed into terms of a monetary obligation in lieu of such service, arising by virtue of any statute or of any contract entered into between such individual and any public institution of higher education in consideration of any state scholarship awarded to or received by such individual as a student in such institution, provided that such service is terminated by an honorable or medical discharge and such individual entered such service within four years after leaving such institution.
Va. Code § 23.1-606