In life, just as in sports, timing is everything. The family of a high school athlete should have known that.

The Yarmouth High School girls’ lacrosse player went to federal court this week to get a judge to halt consequences that began flowing her way after a picture posted on a social networking Web site appeared to show her drinking alcohol. That’s a violation of the school’s honor code, which she and other students who participate in extracurricular activities signed.

The family’s attorney filed a complaint, saying that the student’s rights had been violated and the school was using the code to intrude into an area that should be considered a parent’s sole responsibility. A judge refused to grant an injunction, but the case is still alive on the federal court docket.

This might be a good conversation for a community like Yarmouth to have, but the timing is all wrong. The time to protest an honor code is before you sign it. After the student and her family agreed to accept the code and the student violated its terms, it’s not the school that has gone too far.

Schools recognize that students want to take part in sports and use that as a carrot to encourage good behavior. That can range from things that are entirely within the school’s traditional authority, like grades or attendance, to enforcing a ban on weekend parties, which in the past would have been considered a job for parents or the police.

What’s changed is that a lot of parents don’t want that responsibility all to themselves and welcome any help that they can get. If the school can use access to playing a sport to influence their kid’s behavior, many parents are happy to have an ally.

But if more families share the Yarmouth family’s objection to the honor code, they have an option: They can refuse to sign. If enough families felt the same way, the school district would be forced to rethink its policy.

And there are better venues for taking on these issues than a federal courthouse. School committees are elected bodies with the ultimate authority over policies within their districts. That should be the place to have a community conversation about the code’s value, not the U.S. District Court.

Just like the timing, the place for the discussion also matters. In this case, both were way off.