Social media is sharply divided over a United Airlines decision to block two teens from boarding a flight, because they were wearing leggings that violated the dress code on their father's employee travel pass.

The two teens were barred from boarding a flight from Denver to Minneapolis due to their attire, a United Airlines spokesperson told The Associated Press. The girls, whose ages were not released, agreed to change into pants and take another flight.

Witness Shannon Watts, who tweeted about the incident afterward, said the girls' father was allowed to board the plane wearing shorts. "Since when does United police women's clothing?" she tweeted.

The incident proved highly contentious on Twitter, with many coming out against United, including actress Patricia Arquette, actor Seth Rogen, comedian Sarah Silverman and model Chrissy Teigen.

United defended the decision on Twitter, and in a statement posted on its website.

"To our regular customers, your leggings are welcome," United said in a statement addressing the controversy. The airline explained that it allows employees to extend their free-flight privilege to friends and family, whom it refers to as "pass riders."

"When taking advantage of this benefit, all employees and pass riders are considered representatives of United," the airline statement says. "And like most companies, we have a dress code that we ask employees and pass riders to follow. The passengers this morning were United pass riders and not in compliance with our dress code for company benefit travel."

Many on Twitter sided with the airline, saying that critics were too quick to cry foul at the possibility of discrimination.

One individual said he was initially "disgusted" with the situation, but his attitude changed after reading the statement from United.