The traditional-values dress code policy of a North Carolina charter school was tough.

Now, it's also unconstitutional, based on the ruling of a federal judge.

Charter Day School in Leland had a dress policy that forced girls to wear skirts, skorts or jumpers that are knee length or longer, WECT reported. Failure to comply could have meant discipline or expulsion for the young students.

According to WECT, the parents of three children, ages 5, 10 and 14, filled a lawsuit along with the Civil Liberties Union against Charter Day.

STATE LAWMAKER WANTS A SCHOOL DRESS CODE FOR PARENTS: 'YOU'D BE SURPRISED AT SOME OF THE STUFF WE SEE'

"All I wanted was for my daughter and every other girl at school to have the option to wear pants so she could play outside, sit comfortably and stay warm in the winter," Bonnie Peltier, the mother of a former Charter Day School student, told WECT. “We’re happy the court agrees, but it’s disappointing that it took a court order to force the school to accept the simple fact that, in 2019, girls should have the choice to wear pants.”

Students play outside Charter Day. The school's dress code was  deemed unconstitutional (WECT)

The lawsuit also maintained that skirts restricted the students’ movement, inhibited their participation in play and made it tough to sit on the floor.

U.S. District Judge Malcolm Howard found the policy in violation of violates the Equal Protection Clause of the Constitution.

STUDENTS STAGE WALKOUT TO PROTEST SCHOOL'S DRESS CODE BAN ON DO-RAGS

The school's founder and the architect of the dress policy, Baker A Mitchell Jr., said in an email that the policy was intended to promote "chivalry" and "traditional values." Mitchell wanted "to preserve chivalry and respect among young women and men," and offered the 1999 Columbine High School massacre as a motivation for a return to simpler times.