A federal court in North Carolina ruled against a charter school that required girls to wear dresses.

The charter school claimed it was not subject to federal laws against discrimination because it is not a “state actor.” Charter schools frequently claim they are not “state actors” when they violate civil rights laws or labor laws, but simultaneously say they are public schools.

An en banc federal appeals court ruled Tuesday that a public charter school in North Carolina violated the equal protection clause when it required girls to wear skirts.

The full 4th U.S. Circuit Court of Appeals at Richmond, Virginia, ruled against Charter Day School Inc. in a June 14 decision. Judge Barbara Milano Keenan wrote the majority opinion.

The Charter Day School required girls to wear skirts, jumpers or skorts based on the view that girls are “fragile vessels” deserving of gentle treatment by boys, the appeals court said.

The school had argued that the school is not a state actor subject to the Constitution, and that the federal law banning discrimination on the basis of sex in education programs did not apply to dress codes.

The appeals court ruled against the school on both arguments.

The 4th Circuit decision is the first by a federal appeals court to recognize that charter schools receiving public funds must abide by the same constitutional safeguards as traditional public schools, according to a press release by the American Civil Liberties Union.

The en banc court and a prior 4th Circuit panel agreed that sex-specific dress codes may violate Title IX of the Education Amendments of 1972. But the en banc court went further than the panel when it ruled that the charter school violated the equal protection clause

The school founder had said skirts embody “traditional values” and preserve “chivalry” and respect. Chivalry, the school founder said, is a code of conduct in which women are “regarded as a fragile vessel that men are supposed to take care of and honor.” School board members agreed with those objectives, including the goal of fostering “traditional roles” for children.

“It is difficult to imagine a clearer example of a rationale based on impermissible gender stereotypes,” the appeals court said.

Nine judges agreed with the opinion. Six dissented, in whole or in part, on the grounds that charter schools are not state actors.