disclaimer: This is german and US law.
By law no one is required to even answer to the police… Police can detain and/or arrest you if they have grounds, but furthermore: no one has to talk to police / answer to them.
Random searches ? by law you have no obligation to do as they say. Yes they may arrest you being annoying or whatever but couldnt charge you unless they make something up. Only a court summoning (in the US subpoena) is something you have to comply.
How is this relevant ? Well by law minors dont have less rights than adults. I’m pretty sure that there is no single law even talking about the relationship and duties of students vs teachers, correct me if I am wrong, but indeed that would be strange anyway.
If a student would have to comply as a teacher says…
First those terms are super vague. Whats a student, whats a teacher ? If you teach me something is that enough ? If a child gets coaching / private lessons and that teacher orders the child to do X, would it have to comply ?
Forbidding phones is pretty ridiculous to me seeing how they are a ubiquitous part of modern life. However that would fall under property law or similar, meaning, they own the school and they can say that all “guests” cannot have cellphones. Or at least not display them. Technically this would apply to parents as well and all that AND its a public building so… but now it gets complicated.
I just like to point out that minor mostly do not have less right than adults.
Everyone likes to think so, but its actually not true, by law.
Are you allowed to assault your child ? (hitting it) No, by law absolutely not. Of course kinda hard to sue someone if they dont go overboard.
If you child is like 10, has a diary, you find that diary and post stories on the internet, is that illegal ? Absolutely.
If you actually look at the laws you will find that the vast majority of laws pertaining minors are actually obligations that adults have to protect them, not laws that reduces their personal rights. With the exception of “capacity” telling how legally a person has to be X years old to be legally allowed to purchase things (which is some cases make some on those candy purchases unlawful, just saying :3)