Honestly, I think dress codes in general tend to be pretty fucking stupid, specially for schools. Can't come to school wearing short-shorts? Well, if your teachers weren't so god damned boring, maybe the students wouldn't be so easily distracted. Plus, a lot of them are teenagers, or to put it a better way, a horde of kids who are at various stages of extreme hormonal changes whose decision-making skills are largely dictated by their genitals.
Seriously, though, I'd go to France in full face-mask-and-gown attire (whatever the proper term for that is in Muslim society) just to fuck with the limp-dick assholes who make such asinine laws. Though, I do find it somewhat ironic that a country most stereotypically known for an abundance of extreme promiscuity has moronic dress code laws.