An action in which surety for costs is required and has not been given must be dismissed on motion and notice by the defendant at any proper time before judgment, unless in a reasonable time to be allowed by the court such surety for costs is given.
N.D.C.C. § 28-26-27