Two girls wearing leggings were stopped from boarding a United Airlines flight Sunday because they did not comply with the company’s dress code for “pass riders,” the airline said. Pass riders are passengers who are either airline employees or their relatives who have perks to fly free or at discounted rates.

Pass travelers are required to wear “neat and professional” clothing to represent the airline well, according to United Airlines policy, cited by CNNMoney. They are not allowed to wear form-fitting lycra or spandex tops, pants and dresses, clothes that have offensive words or graphics printed on them, "excessively dirty" attire, or anything that is "inappropriately revealing."

"Pass riders should use good judgment and common sense" about clothing not mentioned on the airline's list, the policy stated. Moreover, those enjoying the perks of airline employment "should always meet or exceed the casual standards" of the flying public, the report added, citing the policy. Most airlines in the world have a similar policy.

The airline triggered criticism for barring two girls from boarding a flight from Denver to Minneapolis because they wore leggings. The matter was first reported on Twitter by Shannon Watts, founder of gun reform group Moms Demand Action.

Watts told the New York Times on Sunday that she saw a “frantic” family with the two girls at Denver International Airport having an argument with a gate agent, who told them, “I don’t make the rules, I just enforce them.”

The girls’ mother reportedly told Watts the daughters were denied boarding because the gate agent said they were not wearing appropriate travel attire.

“But please keep in mind that the dad had on shorts that did not hit his knee — they stopped maybe two or three inches above his knee — and there was no issue with that,” Watts told the Times.

United Airlines responded to the criticism and explained its policies in a statement saying: "The passengers this morning were United pass riders and not in compliance with our dress code for company benefit travel. We regularly remind our employees that when they place a family member or friend on a flight for free as a standby passenger, they need to follow our dress code." 

However, Twitters users, including celebrities, slammed the airline for such a policy, which they called sexist.