This morning, a United Airlines passenger took to Twitter to complain that a gate agent refused to let three passengers board because they were wearing leggings. The airline said that its rules allow airline personnel to refuse service for passengers who aren’t properly attired.

This post has been updated.

The incident appears to have happened during boarding for a flight headed to Minneapolis from Denver. Twitter user Shannon Watts noted that her complaint originated when the gate agent refused to allow three girls to board their flight, and asked why the airline was policing clothing choices. While one girl was ultimately allowed to fly after changing, two others were reportedly not.

1) A @united gate agent isn't letting girls in leggings get on flight from Denver to Minneapolis because spandex is not allowed? — Shannon Watts (@shannonrwatts) March 26, 2017

2) She's forcing them to change or put dresses on over leggings or they can't board. Since when does @united police women's clothing? — Shannon Watts (@shannonrwatts) March 26, 2017

3) Gate agent for flt 215 at 7:55. Said she doesn't make the rules, just follows them. I guess @united not letting women wear athletic wear? — Shannon Watts (@shannonrwatts) March 26, 2017

According to a United customer service official on Twitter, the airline’s Contract of Carriage allows airline personnel to refuse service to, or even remove passengers “for the safety of such Passenger or other Passengers,” which includes passengers “who are barefoot or not properly clothed.” In a follow-up tweet, the airline said that this decision is left to the gate agent’s discretion.

Watts’ tweets attracted attention, and the problem has become a small public relations issue for the airline, as a number of other users have taken to Twitter to complain about the decision. They pointed to the vague nature of the language, the discretion allowed for gate agents, and the perception that the airline is allowed to police clothing for girls and women.

After the initial posts, the customer service agent addressed complaints with the same language: “UA shall have the right to refuse passengers if they are not properly clothed via our Contract of Carriage.”

@kerry_g537 UA shall have the right to refuse passengers if they are not properly clothed via our Contract of Carriage. ^FS — United (@united) March 26, 2017

@raleigh_mecklin UA shall have the right to refuse passengers if they are not properly clothed via our Contract of Carriage. ^FS — United (@united) March 26, 2017

@ElesaCooperson UA shall have the right to refuse passengers if they are not properly clothed via our Contract of Carriage. ^FS — United (@united) March 26, 2017

@geesemom UA shall have the right to refuse passengers if they are not properly clothed via our Contract of Carriage. ^FS — United (@united) March 26, 2017

The airline rep has since said that the company acknowledged “the severity of the situation,” and that they are looking into it, and has reminded other users that the passengers weren’t properly attired.

Update March 26th, 2:36PM ET: United posted a tweet to address the issue, noting that the passengers in question were United Pass Riders — passengers who fly under employee pass privileges, either employees or family members of employees.

The passengers this morning were United pass riders who were not in compliance with our dress code policy for company benefit travel. — United (@united) March 26, 2017

A United spokesperson spoke to Colorado’s 9 News, and explained that the three passengers in question were not permitted to board because they didn’t meet the criteria for Pass riders, who are held to the company’s internal dress code standards. She also noted that “yoga pants or leggings are more than welcome for regular paying customers.” The spokesperson did not release a copy of the dress code, saying that it was an internal document.

We’ve reached out to United for comment, and will update if we hear further.