Uniform code
You may be looking for Starfleet's uniform code of conduct or the Federation Uniform Code of Justice.
A uniform code was a regulation governing the proper manner in which a uniform must be worn.

In 2371, Lieutenant Tuvok was given the responsibility of training four Maquis crewmembers in Starfleet rules and procedures. During the initial briefing, he noted that scuffed boots, Bajoran earrings, elaborate headbands and jewelry, even if hidden from view, were forbidden under the Starfleet dress code. ()

In 2372, upon being activated by a pajama-clad B'Elanna Torres, The Doctor, mistaking her attire for a new uniform, or perhaps being sarcastic, expressed his wish that somebody would have informed him if there had been a change in 's dress code. ()

While on duty, Major Kira Nerys often wore a bracelet given to her by Tekeny Ghemor. In 2373, while visiting, he noticed she was wearing it, and she admitted to him that it might have been a violation of the Bajoran Militia uniform code. ()
 
Law