Correction: An earlier version of this story misrepresented the plaintiffs in the case.

Uber Technologies Inc. and Lyft Inc. must recognize their drivers as employees in compliance with California law, a San Francisco judge held Monday.