RICHMOND, V.A. (AP) — A federal appeals court has ruled that a North Carolina charter school violated female students’ constitutional rights by requiring them to wear skirts.

A majority of the full U.S. 4th Circuit Court of Appeals found that the policy at Charter Day School in Leland violated the girls’ constitutional equal protection rights.

The court sided with parents who had argued that their daughters were put at a disadvantage by the requirement.

Public schools have long been banned from enacting such mandates, but the court’s majority concluded that public charter schools are also “state actors” and are therefore subject to the Constitution’s equal protection clause.