Yes, but punishment should depend on the circumstances surrounding the student's case
Sometimes it can't be helped or the enforcement is far too rigid. Other times, it is a genuine problem that needs to be solved and will cause trouble for the student's future and teacher.