School uniforms are common in New Zealand. The legal authority for having a uniform is the power of the board of trustees to make rules it considers necessary for control and management of the school.
Objection can be made by a student if that student considers the rules are a breach of personal human rights. A court is unlikely to overrule a board so long as the requisite uniform conforms to commonly accepted standards of suitable clothing and the necessary procedural requirements have been met. The most likely basis for a successful objection will be based on religious or faith grounds and possibly health issues. Even then a court is likely to only allow an exception or variation for the individual involved and not make a blanket ban. So, for most students there is little prospect of avoiding the requirement to wear the school uniform.