On the heels of Lyft's (NASDAQ:LYFT) initial public offering and just ahead of Uber's upcoming IPO, the two ridesharing companies have both stopped hiring new drivers in New York City, according to Politico. Uber reportedly stopped bringing new drivers on board in the city on April 1, while Lyft halted any new drivers from signing up starting on April 15.

This decision from both companies comes after New York City passed a law (which went into effect in February) that requires ridesharing companies to pay drivers in the city $17.22 per hour after expenses have been paid.

Woman getting into a car.

Image source: Lyft.

Uber said on its website that it wouldn't hire new drivers in NYC "due in part to new TLC [Taxi and Limousine Commission] regulations," and Lyft said on its website, "Because of TLC regulations, we're currently not accepting new drivers in New York City."

The law penalizes Uber and Lyft if they have too many drivers on the roads not carrying passengers. While having a lot of available drivers is great for riders looking to get an Uber or Lyft quickly, there are several arguments being made against having too many ridesharing vehicles in the city. These include: It lowers wages for drivers (because there aren't enough passengers to make more money), it increases traffic congestion, and it creates an unfair advantage over taxi services that are more regulated.

Uber told Politico that once the number of available drivers drops to manageable levels, they'll begin hiring new ones in the city again.

Investors: Be aware of ridesharing regulations like this one

With Uber and Lyft temporarily backing away from hiring new drivers in New York, the wage regulation for ridesharing drivers appears to be working the way it was intended. With fewer drivers on the road, the current ones should be able to earn more wages. In fact, Politico reported that an NYC presentation this month showed that drivers had earned $56 million more than they would have without the regulation.

Investors should take notice of the recent move by Uber and Lyft to limit drivers in New York not only because it's one of the most important ridesharing markets in the U.S. but also because it could be an early indicator of how other cities may deal with the ridesharing companies. If other cities decide to pass similar laws, then the current rider growth that these companies are experiencing could slow.

One of the potential risks Lyft highlighted before going public was the fact that the company is subject to "a wide range of laws and regulations, many of which are evolving, and failure to comply with such laws and regulations could harm our business, financial condition and results of operation."

Lyft also said in its S-1 filing that "Our business depends largely on our ability to cost-effectively attract new riders and increase utilization of our platform by our existing riders." And Uber said in an SEC filing that "Our success in a given geographic market significantly depends on our ability to maintain or increase our network scale and liquidity in that geographic market by attracting drivers."

In short, the two companies have highlighted regulatory changes like the new New York City law as a risk factor for their businesses.

Considering the relative newness of the ridesharing industry and the fact that the two companies are just now having to adapt to the new law, it's difficult to nail down just how much of an impact this will have on Uber's and Lyft's businesses.

What's clear is that investors need to keep a close eye on how the companies respond to these regulations and whether other cities follow New York's lead. Worrying about these regulations right now isn't necessary, but dismissing the effect city laws might have on the growth of the ridesharing industry isn't advisable either.