I guess the enforcement part is the difficult part. In the 70's I once had to tell a young female sudent that she needed to come to school in a dress that was at least long enough to sit on. I threatened to send her home if she did not comply. (I told her she was distracting me - No doubt today I would have been brought up on charges) But back then I got away with it, she did not mean to get in trouble, she only wanted to draw some attention to herself. I did not do this in front of the whole class, I waited till class was over and told her privately as she left the room. (It worked.)