Recent publicity surrounding a casting call for the Broadway musical “Hamilton” should remind employers of the danger of using discriminatory criteria in job ads.

The production of “Hamilton” has generated widespread attention and praise, at least in part because of its diverse cast. When the show’s producers issued a casting call seeking “non-white men and women” to audition, the ad drew criticism from the union representing theater actors, among others. Actors’ Equity argued the casting call was regulated by the union’s rules, and that Hamilton’s producers violated those rules. The producers have agreed to amend the ad language to indicate that people of all races and ethnicities are invited to audition, while stating that the show remains committed to hiring a diverse cast.

While the controversy over the Hamilton ad may raise issues specific to employers in the arts, employers in all industries should take note. Federal law prohibits discrimination in job ads on the basis of race, color, religion, sex (including gender identity, sexual orientation, and pregnancy), national origin, age, disability, or genetic information. State and local laws may prohibit additional types of job ad discrimination.

Advertising diversity as a goal is permissible, but exclusionary rules such as those used by Hamilton’s producers are not. The lesson from this episode is clear: no matter the industry, employers should avoid using such criteria in describing desired job candidates.