delivered the opinion oe the court.
*306If a non-resident, or any corporation, institutes an action in any of the courts of this state -without giving a bond for costs, with resident surety, the action shall be dismissed. (Sections 3 and 5, chap. 26, General Statutes.) But the motion to dismiss must be made before judgment. The execution of the bond is for .the protection of the defendant and the officers of the court, and not for the purpose of giving the court jurisdiction either of the subject-matter of the litigation or of the person of the party sued.
The statute gives to the defendant the absolute right to have the action dismissed in case of its violation; but this right, like all similar rights, may be waived, and if no steps are taken to enforce it before judgment the defendant will be held to have waived the right, and will not be allowed to raise the question for the first time in the Court of Appeals.
For these reasons the judgment appealed from must be affirmed.