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.”