NEW YORK, NY - JULY 30:  A Lyft ride hailing vehicle moves through traffic in Manhattan on July 30, 2018 in New York City. After a significant increase in local traffic and a spate of suicides by taxi drivers, New York City is planning to vote on capping ride-sharing services such as Uber and Lyft. The  City Council's move to vote on the measures could come as soon as Aug. 8. If the vote was to succeed, New York City would become the first major U.S. municipality to cap ride-sharing services.  (Photo by Spencer Platt/Getty Images)
Spencer Platt/Getty Images North America/Getty Images
NEW YORK, NY - JULY 30: A Lyft ride hailing vehicle moves through traffic in Manhattan on July 30, 2018 in New York City. After a significant increase in local traffic and a spate of suicides by taxi drivers, New York City is planning to vote on capping ride-sharing services such as Uber and Lyft. The City Council's move to vote on the measures could come as soon as Aug. 8. If the vote was to succeed, New York City would become the first major U.S. municipality to cap ride-sharing services. (Photo by Spencer Platt/Getty Images)
Now playing
00:55
New bill would make rideshare drivers benefits-eligible
One shot doses of the Johnson & Johnson COVID-19 vaccine are prepared at a clinic targeting immigrant community members on March 25, 2021 in Los Angeles, California.  The clinic, run by the St. John's Well Child and Family Center, estimates it has vaccinated more than 100,000 people in the Los Angeles area amid reports of two undocumented women who were refused coronavirus vaccinations in Orange County Rite Aid stores. Rite Aid has called the refusals mistakes in a written statement.  (Photo by Mario Tama/Getty Images)
Mario Tama/Getty Images
One shot doses of the Johnson & Johnson COVID-19 vaccine are prepared at a clinic targeting immigrant community members on March 25, 2021 in Los Angeles, California. The clinic, run by the St. John's Well Child and Family Center, estimates it has vaccinated more than 100,000 people in the Los Angeles area amid reports of two undocumented women who were refused coronavirus vaccinations in Orange County Rite Aid stores. Rite Aid has called the refusals mistakes in a written statement. (Photo by Mario Tama/Getty Images)
Now playing
01:35
Corporate America is requiring vaccinations
Now playing
06:12
You'll have to prove you're vaccinated to dine at these famous restaurants
BELLEVUE, WA - NOVEMBER 30: Microsoft CEO Satya Nadella addresses shareholders during the 2016 Microsoft Annual Shareholders Meeting at the Meydenbauer Center November 30, 2016, 2016 in Bellevue, Washington. The company posted $22.3 billion in profits for the 2016 fiscal year. (Photo by Stephen Brashear/Getty Images)
Stephen Brashear/Getty Images
BELLEVUE, WA - NOVEMBER 30: Microsoft CEO Satya Nadella addresses shareholders during the 2016 Microsoft Annual Shareholders Meeting at the Meydenbauer Center November 30, 2016, 2016 in Bellevue, Washington. The company posted $22.3 billion in profits for the 2016 fiscal year. (Photo by Stephen Brashear/Getty Images)
Now playing
02:52
Microsoft CEO shares leadership lessons he's learned during the pandemic
Now playing
04:56
How these startups are tackling high drug costs in the US
WASHINGTON, DC - MARCH 09: Elon Musk, founder and chief engineer of SpaceX speaks at the 2020 Satellite Conference and Exhibition March 9, 2020 in Washington, DC. Musk answered a range of questions relating to SpaceX projects during his appearance at the conference. (Photo by Win McNamee/Getty Images)
Win McNamee/Getty Images
WASHINGTON, DC - MARCH 09: Elon Musk, founder and chief engineer of SpaceX speaks at the 2020 Satellite Conference and Exhibition March 9, 2020 in Washington, DC. Musk answered a range of questions relating to SpaceX projects during his appearance at the conference. (Photo by Win McNamee/Getty Images)
Now playing
04:19
Bitcoin and crypto's 'Elon Musk problem'
Now playing
02:29
'Outrageous' used car prices amid highest inflation in 13 years
jeff bezos blue origin space launch cooper intv sot vpx_00021804.png
jeff bezos blue origin space launch cooper intv sot vpx_00021804.png
Now playing
03:05
Jeff Bezos reveals most surprising part of space mission
CNN
Now playing
03:05
These moms explain how child tax credit checks will help them
CNN/John General/Atom Smasher
Now playing
04:04
Here's everything you need to know about ransomware
Now playing
04:04
Subway CEO on menu changes: The one thing we did not touch is our tuna
Now playing
02:40
Gretchen Carlson tells Anderson about the bipartisan bill she's backing to help workers
Rachael Flores
Now playing
02:22
Employees go viral after resigning via Burger King sign
CNN/Shutterstock
Now playing
02:20
Prices are going up on almost everything. Here's why
A car drives by a Speedway gas station next to the Shell refinery on March 03, 2021 in Martinez, California. Gas prices have increased across the United States to a national average of $2.72 per gallon, an increase of 30 cents from one month ago. Gas in California has an average price of $3.68 per gallon, the highest in the nation.  (Photo by Justin Sullivan/Getty Images)
Justin Sullivan/Getty Images
A car drives by a Speedway gas station next to the Shell refinery on March 03, 2021 in Martinez, California. Gas prices have increased across the United States to a national average of $2.72 per gallon, an increase of 30 cents from one month ago. Gas in California has an average price of $3.68 per gallon, the highest in the nation. (Photo by Justin Sullivan/Getty Images)
Now playing
04:01
Gas prices are high. Here's why
Now playing
02:46
The US needs construction workers
New York CNN Business —  

Uber and Postmates are suing California over its controversial law to require that many so-called “gig workers” be considered employees rather than independent contractors.

The companies filed suit in Federal Court in Los Angeles on Monday. According to the complaint, the AB-5 statute violates several parts of both the US and California constitutions.

“AB-5 is a vague and incoherent statute that does not accomplish what its sponsors have stated they sought to achieve,” the lawsuit claims.

The companies are joining two drivers who use their apps — Lydia Olson and Miguel Perez — in suing the state.

AB-5, which is set to go into effect in the new year, requires businesses to treat workers as employees and not contractors if they are subject to company control or perform work that is part of the firm’s usual course of business. The suit claims that it will stop companies such as Uber (UBER), Postmates, Lyft (LYFT)or DoorDash from using as many workers in the future.

Supporters of the bill say it’s a way to protect workers and make sure they’re eligible for benefits offered to employees, such as minimum wage, paid sick days and health insurance benefits.

“The hollowing out of our middle-class has been 40 years in the making, and the need to create lasting economic security for our workforce demands action,” said a statement from California Governor Gavin Newsom when he signed the bill into law.

Lorena Gonzalez, the sponsor of the law, criticized this and other moves by Uber to avoid the impact of the legislation.

“The one clear thing we know about Uber is they will do anything to try to exempt themselves from state regulations that make us all safer and their driver employees self-sufficient,” she said in a statement. “In the meantime, Uber chief executives will continue to become billionaires while too many of their drivers are forced to sleep in their cars.”

Postmates said it is not trying to be exempt from the law to or to avoid established rules for determining who is an employee and who is an independent contractor. It issued a statement calling for the two sides to work together to find a solution to protect on-demand workers.

“California has failed to heed calls nor answer the big questions about the future of work and workers in a changing economy,” it said. “Now is not the time to give up or stop talking. Californians deserve a thoughtful, collaborative process to address the 21st century workforce. Not another false choice.”