(CNN) Couples applying for marriage licenses in Virginia will no longer have to disclose their race, the state's attorney general said, after three couples said they were denied marriage licenses after declining to do so.

Applicants will now be able to check a box on the form that says, "declined to answer," a spokesman from Attorney General Mark Herring's office said Sunday.

Clerks of court across Virginia received the new form and a memo, said Herring's spokesman. The memo states that "clerks should issue a license regardless of an applicant's answer or non-answer to that inquiry."

"We were happy to help quickly resolve this issue and get these couples what they asked for," Herring said in a statement. "These changes will ensure that no Virginian will be forced to label themselves in order to get married. I appreciate the courage these couples showed in raising this issue, and I wish them all the best in their lives together."

Herring's new guidance was sent out after three couples sued the state to overturn the statute, which asked marriage applicants to disclose their race in order to get a marriage license.

Read More