Let’s keep in mind, however, that we are talking about an 8th grader, typically a 14 year old, defying a teacher’s effort to enforce the dress code. In this situation the student should at most respectfully ask to walk with the teacher to an administrator for further consideration of the issue.
With keeping his age in mind, I know of few 14 year olds that have the poise or maturity to manage a conflict with an adult in such a way.
Deferring the issue to the administrator is purely the responsibility of the teacher, and that option should have been in the teachers mind before ever confronting the kid, and then utilized at the first sign of resistance.
Pushing the issue to disruption is the teachers error.