California Code
CHAPTER 4 - Object of a Contract
Section 1596.

1596. The object of a contract must be lawful when the contract is made, and possible and ascertainable by the time the contract is to be performed.

(Enacted 1872.)