
34 Cal.App.2d 628 (1939)
THE STATE OF CALIFORNIA, Petitioner,
v.
THE SUPERIOR COURT OF SACRAMENTO COUNTY, Respondent.
Civ. No. 6294. 
California Court of Appeals. Third Appellate District.  
September 22, 1939.
 Earl Warren, Attorney-General, Ralph H. Cowing, Deputy Attorney-General, and Gerald M. Desmond, for Petitioner.
 Hervey & Holt for Respondent.
 Tuttle, J.
 This is an application for a writ of mandate directing the Superior Court of the State of California, in *629 and for the County of Sacramento, to dismiss a certain civil action.
 On December 22, 1938, an action was filed in the Superior Court of the State of California, in and for the County of San Diego, entitled "Marian Louise Brewer and Lee M. Brewer, plaintiffs, vs. The State of California and John Doe, defendants". The plaintiffs in said action sought to recover damages from the state occasioned by personal injuries alleged to have been sustained by them in a collision between an automobile in which they were riding and an automobile which is alleged to have been driven by an employee of the State of California.
 On the 10th day of April, 1939, defendants, after due notice, moved the court to dismiss said action upon the ground that the undertaking filed by plaintiffs "is insufficient as a matter of law to comply with the terms of Section 688 of the Political Code of the State of California". It appeared upon said hearing that the sole contention of defendants was that plaintiffs had failed to file the affidavit of the sureties upon the undertaking, as required by the provisions of section 1057 of the Code of Civil Procedure. It further appears that the following writing was endorsed upon said undertaking:
 "Good cause appearing, the amount of bond required by Section 688, Political Code, is hereby fixed at the sum of Five Hundred Dollars ($500.00), and the sureties in the above undertaking having been examined by me, the said undertaking is approved."
 "Dated this 22 day of December, 1938."
 "Arthur L. Mundo,"
 "Judge of the Superior Court."
 Prior to the date of said hearing plaintiffs filed such affidavit in the form required by the statute, and it is not controverted by the state that at the time of said hearing the undertaking complied with the law in all respects. The motion was denied by the trial court.
 Section 688 of the Political Code reads as follows:
 "At the time of filing the complaint in any such suit, the plaintiff shall file therewith an undertaking in such sum, but not less than five hundred dollars, as a judge of the court shall fix, with two sufficient sureties, to be approved by a judge of the court, and conditioned that, in case the plaintiff fails to recover judgment, he shall pay all costs incurred *630 by the State in such suit, including a reasonable counsel fee, to be fixed by the court."
 Section 1057 of the Code of Civil Procedure reads as follows:
 "In any case where an undertaking or bond is authorized or required by any law of this State, the officer taking the same must ... require the sureties to accompany it with an affidavit that they are each residents and householders, or freeholders, within the State, and are each worth the sum specified in the undertaking or bond, over and above all their just debts and liabilities, exclusive of property exempt from execution; ..."
 [1] The failure to file with the undertaking an affidavit of justification would not affect in any manner the liability of the sureties on the obligation. Such affidavit forms no part of the contract. (Moffat v. Greenwalt, 90 Cal. 368 [27 P. 296]; Murdock v. Brooks, 38 Cal. 596; People v. Shirley, 18 Cal. 121.) It is not pointed out by the state, nor can we see how any substantial prejudice would result from the failure to comply with the letter of the law. The general rule is that, "if there has been an attempt to comply with the law by giving security, the cause should not be dismissed without giving the party an opportunity to give additional and sufficient security". (15 C.J., p. 221, sec. 544.) This is the rule prevailing in California in respect to an undertaking for costs on appeal to the Supreme Court. (Dixon v. Allen, 69 Cal. 527 [11 P. 179]), and also in respect to an undertaking given to secure the payment of costs in an action for slander. (Becker v. Schmidlin, 153 Cal. 669 [96 P. 280].) In the latter case it is said:
 "It is true that a plaintiff neglecting to file a sufficient undertaking when suit is commenced incurs the danger of having his action dismissed upon the motion of the defendant for such failure, but when such motion is made and is well taken, the court may, nevertheless, in the exercise of a sound discretion, having jurisdiction of the action, permit the plaintiff to file a new and sufficient undertaking. The undertaking provided by the statute to be given runs in terms in favor of a defendant, and is intended to secure him in the costs and charges of the action which may ultimately be awarded him. The provision is for his sole benefit and this being true, the discretion vested in the court of permitting *631 plaintiff to file a new undertaking which will afford a defendant all the protection the law intends should be exercised to effect that end. So exercised, it will permit the cause to be tried on its merits, which the law favors, instead of preventing it, which it discountenances. Especially should this permission be granted where it appears that a party in good faith has originally endeavored to comply with the statute by filing an undertaking when the suit is commenced. This the plaintiff here did." (Italics ours.)
 [2] The argument of appellant is predicated upon a strict construction of section 1057 of the Code of Civil Procedure. It is our duty, however, to construe that section liberally, "with a view to effect its objects and to promote justice". (Sec. 4, Code Civ. Proc.) The sureties here actually did justify before a judge of the superior court, and the only omission was a failure to comply with the law in respect to filing evidence of that fact. Such omission was not a jurisdictional matter. Furthermore, the formal affidavit of the sureties was filed when the motion was heard. In the case of Standahl v. Splivalo, 13 Cal.App.2d 85 [56 PaCal.2d 298], no undertaking whatever was filed, and it was held that a motion to dismiss was proper. Here, the undertaking was filed in good faith, but certain technical requirements were not met. We do not regard the Standahl case as authority for the position taken by the state here.
 The action of the trial court in denying the motion to dismiss was, in the language of the Code of Civil Procedure used above, "to promote justice".
 The writ is denied and the proceedings dismissed.
 Deirup, J., pro tem., and Thompson, Acting P. J., concurred.
