If any part of a single consideration for one or more objects, or of several considerations for a single object, is unlawful, the entire contract is void.
(Enacted 1872.)