California Codes, Civil Code - CIV, Division 3 — Obligations, Part 2 — Contracts, Title 4 — Unlawful Contracts, Section 1667
That is not lawful which is:
1. Contrary to an express provision of law;
2. Contrary to the policy of express law, though not expressly prohibited; or,
3. Otherwise contrary to good morals.
Notes
Defines unlawful matters as those contrary to an express provision of law, contrary to the policy of an express law even if not expressly prohibited, or otherwise contrary to good morals. Any matter within one of those three categories is treated as not lawful under the contract rules.
Use as reference
Lexinter.net | California Code, Civil Code - CIV § 1667 | https://laws.lexinter.net/codes/california/civil-code/division-3/part-2/title-4/section-1667