California Civil Code
An obligee which accelerates the maturity date of the principal and accrued interest, pursuant to contract, on any loan secured by a mortgage or deed of trust on real property or an estate for years therein, upon the conveyance of any right, title, or interest in that property, may not claim, exact, or collect any charge, fee, or penalty for any prepayment resulting from that acceleration.
The provisions of this section shall not apply to a loan other than a loan secured by residential real property or any interest therein containing four units or less, in which the obligor has expressly waived, in writing, the
right to repay in whole or part without penalty, or has expressly agreed, in writing, to the payment of a penalty for prepayment upon acceleration. For any loan executed on or after January 1, 1984, this waiver or agreement shall be separately signed or initialed by the obligor and its enforcement shall be supported by evidence of a course of conduct by the obligee of individual weight to the consideration in that transaction for the waiver or agreement.