LEBANON, Mo. (AP) — The Missouri Supreme Court on Tuesday upheld a state law criminalizing parents whose children miss school, ruling against two mothers charged in their young children’s tardiness.

Prosecutors charged two moms from Lebanon, Missouri, with misdemeanors and the mothers then went to the state Supreme Court to challenge the law’s constitutionality.

One mother was sentenced to a week in county jail for her first-grade daughter’s nine unexcused absences in the 2021 school year. Another was sentenced to two years of probation for her kindergartener’s seven unexcused absences that year.

Missouri law requires K-12 students to attend school “on a regular basis.” A public defender for the mothers argued the law is unconstitutionally vague.

Supreme Court judges disagreed, ruling that regular attendance means going to school when it is in session.

Judges wrote that school officials can excuse an absence for mental or physical illness and opt not to report parents to prosecutors. Prosecutors, judges wrote, can choose not to charge parents in cases of “minor noncompliance.”

The mothers’ public defender did not immediately return an Associated Press phone call Tuesday.