United Airlines has landed in trouble for not letting on board a 10-year-old who was wearing leggings as it did not meet their dress code.

Chrissy Teigen has vowed to go topless the next time she travels by United Airlines after the company landed in a controversy for refusing to allow a 10-year-old girl to board a flight because she was wearing leggings.

Netizens have accused the airline of body shaming after passenger Shannon Watts tweeted about the situation.

"I have flown united before with literally no pants on. Just a top as a dress. Next time I will wear only jeans and a scarf," Teigen wrote on Twitter.

The airline reportedly refused to allow the child and two others on their flight from Denver to Minneapolis for not meeting their dress code. The girl was allowed to travel with them only after she changed into a dress. But the other two were refused on board as they did not have a change of clothes with them.

The passengers this morning were United pass riders who were not in compliance with our dress code policy for company benefit travel.

The company later released a statement regarding the issue stating that they do not have a no leggings policy for regular customers. However, their "pass riders" have to follow a strict dress code.

We care about the way we present ourselves to you, our customers, as we believe that is part of the experience on board our flights. One of the benefits of working for an airline is that our employees are able to travel the world. Even better, they can extend this privilege to a select number of what we call "pass riders." These are relatives or friends who also receive the benefit of free or heavily discounted air travel – on our airline as well as on airlines around the world where we have mutual agreements in place for employees and pass riders.

When taking advantage of this benefit, all employees and pass riders are considered representatives of United. 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. 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.