More recently, race has been at the center of a series of controversies in Virginia. In February, Mr. Herring and Gov. Ralph S. Northam, both Democrats, admitted to wearing blackface in the 1980s and were widely condemned. In 2017, a white supremacist murdered a woman when he drove into a crowd of peaceful demonstrators in Charlottesville; he was recently sentenced to life in federal prison.

Dr. Edwards said it was a good time to shine a light on old laws, given the political discourse. “I’m really not surprised that we are having these conversations about the ways in which our legal system has propped up white supremacy and white supremacist ideas,” she said.

Mr. Churchill said he decided to join the lawsuit because it was a way to make a difference amid these conversations. “This seemed like a change that we could play a very small part in — helping to throw off one remnant of the Jim Crow segregationist era,” he said.

The forms for marriage license application in Virginia vary by county. The one Mr. Churchill filled out — which was accompanied by the list with derogatory terms — was in Rockbridge County. He said that while county employees there tried to accommodate him and Ms. Rogers when they asked to leave the space blank, the staff members seemed unable to submit the form that way. So the couple left without applying.

Another couple, Ashley Ramkishun and Samuel Sarfo, applied for a marriage license at the Arlington Circuit Court. Their form allowed people to choose from a more standard list of terms that included “African-American/Black,” “Hispanic/Latino,” “Caucasian,” and “Other,” according to court documents. But the couple said they did not want to marry in Virginia if they had to label themselves that way, the complaint said.

Paul Ferguson, who is named in the lawsuit as the clerk of the Arlington Circuit Court, a defendant, said he would have tried to accommodate the couple if they had brought the issue to his attention.

“I personally understand why this is something that would bother them, and my personal opinion is that I don’t see a reason for this to be on the form,” he said in an interview. “But as a clerk of the Circuit Court, even if I disagree with a law, I still have to comply.” Now that the attorney general has weighed in, he added, applicants at the court can decline the race question.