In any action subject to this section, concurrently with the filing of the complaint, the plaintiff shall file an affidavit stating facts showing that the action has been commenced in a county described in this section as a proper place for the trial of the action. If a plaintiff fails to file the affidavit required by this section, the court shall, upon its own motion or upon motion of any party, dismiss the action without prejudice.
Ca. Civ. Code § 1780