He also ruled that Lucan's refusal to follow principal Paul Melloy's directive to get his hair cut did not amount to setting a harmful or dangerous example to other students.
Secondary Principals Association president Tom Parsons said schools now faced the prospect of "lawyering up" simply to ensure rules that might already be clear to students and parents passed the legal test set by the High Court. "One of the unintended consequences [of the ruling] will be the expense school boards have to go to to ensure [rules] are watertight."
Legal expert Dr Bill Hodge said the costs associated with having rules scrutinised and drafted by lawyers would run into thousands of dollars.
"You'd have to have a pretty good lawyer who is experienced in this sort of thing and it is not going to be easy to get these things right.
"And it is not just about hair — presumably it is also about bringing a Swiss army knife or aspirin or some sort of substance that isn't necessarily an illegal high. All of these things will have to be prescribed to that standard. That just makes governance as well as management so much more difficult."
Dr Hodge said the ruling meant that amateur administrators serving on boards of trustees were effectively being held to the standard of professional law makers.
The Battison family said in a statement that they were pleased with the judgment, but disappointed the issue had reached the High Court — they had wanted mediation.
"We do believe rules have a place. But they need to be reasonable and certain. Lucan has had the same style for three years at St John's."
They said he had signed up to the rule and his hair — whether in a hair tie or not — was off the collar and out of his eyes. "In 2014, when girls' hair lengths ... aren't questioned, why should the rules be different for boys? ... It is the school that did not follow the law."
Mr Melloy said he was disappointed with the decision, but would not comment on whether the school rules would now be changed.
He said Lucan had returned to St John's, as previously agreed.
In his judgment, Justice Collins said tensions arose when Mr Melloy, who started as principal last month, attended a 1st XV game and noticed several players had untidy and long hair. After meeting with the principal, Lucan was warned that if he defied the rules he could be suspended.
When he was, his father, Troy Battison, sought a judicial review last month in the High Court.
While there is nothing in yesterday's ruling that would prevent a school setting rules governing the length of students' hair, Justice Collins noted that such rules should give "very careful consideration" as to whether they breached students' rights to autonomy, individual dignity and freedom of expression under the New Zealand Bill of Rights Act.
He ruled the school pay legal costs.
The Battison family's lawyer, Jol Bates, said when asked if he thought the college would appeal against the decision: "The judgment makes it very hard for the school to appeal."
Mt Albert Grammar headmaster Dale Burden said Lucan Battison's parents should have supported the school's judgment. "It should never have gone to court ... You back the school, you don't back your belly-aching teenager on everything.
"These judges don't make it easy for schools, they really don't."
Read also
• Editorial: Judge right to tell school it was out of line