VIRGINIA BEACH, Va. (WAVY) — A judge has dismissed Virginia Beach Del. Tim Anderson’s lawsuit that sought to bar Barnes & Noble from selling two books without parental consent.

“Gender Queer: A Memoir” and “A Court of Mist and Fury” had previously been pulled from Virginia Beach schools.

The judge ruled the lawsuit was unconstitutional under due process, saying that the person that sells the books or allows the child to check out a book cannot be held liable for what the children read in the books.

In May, Anderson (R-Virginia Beach) filed the lawsuit on behalf of former congressional candidate Tommy Altman, demanding a judge find “Gender Queer: A Memoir” by Maia Kobabe and “A Court of Mist and Fury” by Sarah J. Maas obscene to unrestricted viewing by minors.

Anderson highlighted pages and passages in both books that contain what he says many would consider sexually explicit content.

Anderson says he isn’t trying to ban sales of these two books, but instead says this is a situation of restoring parental rights.

“Should parents have a say like they do with R-rated movies, should parents have a say as they do with violent video games and music of being warned?” said Anderson.

The Virginia Beach School Board has already voted to remove “Gender Queer” and “A Court of Mist and Fury” from its libraries, but Anderson also wanted to ban Barnes & Noble from selling the books to minors without parental consent.

“Restricting minors from having access to sexual materials exists in every other medium,” Anderson said. “We are not banning books. Just looking for age-appropriate restrictions on sexual materials.”

Anderson on Tuesday in response says he’s now looking to have a warning system put in place for books, and says that he may bring legislation on the topic. He said Altman is also reviewing options for an appeal.

“Fundamentally, my client believes there should be a different standard of obscenity for children than currently exists for adults, but that will require review by higher courts to conclusively answer this question and possibly additions to the code by the General Assembly,” Anderson wrote on Facebook.

That includes teaching about social justice, gender, race, history and sexual content.

The strategy proved successful last November, as Gov. Glenn Youngkin, (R-Va.) rode to election victory on advocating for “parental rights.”

On the other side, attorneys for Barnes and Noble and other bookstores say it’s unconstitutional and they can’t be held liable for what’s in the books.

“It’s fine for adults but its not fine for children,” said Anderson. “It doesn’t matter if you are straight or gay or trans, you shouldn’t have access to super sexually explicit material.”

“I think to have the government come in and say you can not show these images, you cannot talk about this subject, that is what would be obscene,” said Jeff Trexler who represents Gender Queer author Maia Kobabe.

Trexler says he stands behind his client’s book and the message inside it. He says this book has helped several students all over the country who are questioning their own gender identity.

“Does it have literary significance, does it have artistic significance, does it have political significance, scientific significance and this book has all four,” said Trexler.

Attorneys for Barnes and Noble and other bookstores say it’s unconstitutional and an attack on literature.

“When you are using the law to restrict books that’s the definition of a book ban,” said Attorney for Barnes & Noble, Robert Corn-Revere.

Anderson says he’s now considering introducing legislation to propose a rating system for books so parents have a say.

Anderson has 30 days to appeal if he chooses.

He says he plans to take time to think about all the options on the table.

Check for the latest updates.