I have a couple of pairs of Dockers. Got them nearly 30 years ago when my son was playing Little League. The District Administrator had a rule that in post season play, adults coaches on the playing field could not wear shorts and had to wear Dockers or better.
Had a few bosses in my TV News career that tried to enforce a newsroom dress code. Decades ago it was tough because the on air folks got a clothing allowance, so I can see those folks having rules, but if you aren't paying for my clothing, you have no say. Usually about the first time someone put in an expense report for a new pair of slacks because the toner cartridge on the printer spilled all over their pants, the boss backed off, and no, he did not pay for the damage.
And at the end of my career it was tough because California and Unions tend to frown on those requirements unless it is a uniform and it is provided by the company.