Step out of line

To misbehave, to do something offensive or wrong.

When the children step out of line their teacher becomes very angry.