Suspend a pupil for wearing head-to-toe Muslim dress or a Christian chastity ring and you can expect to win the backing of the courts. But if you send a girl home for wearing a steel Sikh bracelet, then you are guilty of unlawful discrimination on the grounds of race and religion.
It is understandable that staff at Aberdare Girls School in Rhondda Cynon Taf may feel confused and disappointed after their High Court loss this week. They had consulted legal experts about their zero- tolerance uniform policy and knew that their case followed a flurry of similar legal challenges in which other schools had won.
Aberdare's legal battle illustrates the tightrope which schools have to walk between enforcing rules and respecting pupils' beliefs. In the absence of clear guidance, heads have had to rely on common sense, or try to draw conclusions from the messy world of case law.
The recent court judgements suggest that, when placed in similar predicaments, schools need to ask two questions.
First, is the pupil obliged to wear the item because of their faith? Chastity rings can be safely banned: a judge ruled last year that a school in West Sussex was right to suspend a Christian pupil who wore one because she was under "no obligation, by reason of her belief, to wear the ring".
Second, does the school allow pupils to wear an alternative that is acceptable to their religion? A Luton school which prevented a girl from wearing head-to-toe Muslim dress eventually had its decision upheld in the House of Lords, partly because it allowed girls to wear the shalwar kameez, a traditional uniform of trouser and tunic backed by its local mosque.
Yet after that ruling, Lord Bingham stressed that the case only concerned "a particular pupil and a particular school in a particular place at a particular time".
It is a reminder that even with better guidance, schools will still be open to challenges. We can only hope they can be settled without going to court. The saddest aspect of the Aberdare case is that it got so far, particularly when the school decided to fund its own High Court battle.
The most positive sign has been the school's willingness to welcome 14- year-old Sarika back in September. Instances will always exist in education where zero- tolerance must be trumped by tolerance.