The Missouri Teachers Association said it filed suit Friday against the state and two officials seeking an injunction to block enforcement of the new measures, which take effect Aug. 28.
The law prohibits private communication through websites such as Facebook between teachers and current students or former students who are still minors.
The lawsuit asserts the restrictions are so vague and overbroad that it would be difficult to know what is allowed. It contends teachers' free speech and association rights would be restricted.
State Sen. Jane Cunningham, who sponsored the proposal, is confident it will withstand legal scrutiny. She says critics misunderstand the restrictions and that only private communication is banned.