A dress code was a rule enacted by some recreational facilities to govern how well dressed customers were required to be. A uniform code could also be referred to as a dress code. (VOY: "Prototype") Starfleet had a Starfleet uniform code.
In 2373, the maitre d' at a nightclub that Nicky the Nose patronized in chapter 13 of Dixon Hill series holoprogram informed two Borg drones that they had a strict dress code. (Star Trek: First Contact)