Where I work, the men's dress code specifies that your shirt must have a collar and you have to wear smart trousers, and the rules for casual Friday, for both genders, only add the option to wear jeans and/or athletic shoes. It's not the strictest set of rules I've had to work under, but it doesn't provide for men wearing anything below the waist that doesn't have two legs in it.