These days, when we hear the phrase "dress code" we're most likely to associate it with workplace rules.
A lot of jobs still have written guidelines for employee attire, at varying degrees of strictness.
Much rarer are dress codes for social events.
These written requests for attendee attire are usually only one or two words long, meant to be printed on an invitation and understood by all the potential guests.