As per Ballotpedia: Primary: Virginia is one of 14 states that uses an open primary process, in which registered voters do not have to be members of a party to vote in that party’s primary.
Voter registration: Voters had to register to vote in the primary by February 10, 2014.
Don’t know why the question of Dems voting in this primary matters. There is no dem or any other candidate on the ballot in November. David Bratt will be the next Representative of the 8th Congressional Distrct of Virginia.