Vanderburgh, J.
The action is brought to recover damages for the issuance of an attachment against the property of the plaintiff, *197alleged to have been maliciously sued out by the defendants. Shortly after the issuance thereof the plaintiff voluntarily executed the bond provided for by Gen. St. 1878, c. 66, § 157, and procured an order discharging the attachment. He also afterwards moved to set aside-the attachment upon affidavit and notice, and the court, after hearing the parties, granted the motion, and made an order setting the same aside, together with the bond previously given by the defendant to procure the discharge thereof. Upon the trial of this action the court held that the plaintiff had waived his objection to the validity of the attachment by procuring the first order, and accordingly dismissed the case. We think the better opinion is that by the execution of the bond the plaintiff waives his right to proceed by motion under section 158, and that, as the bond has the effect to discharge the attachment, the case stands as if no attachment had been issued. It was not intended to preserve to the defendant in the attachment suit the right to both remedies. Dieolf v. Winterfield, 24 Wis. 143; Shevlin v. Whelan, 41 Wis. 88; Hazelrigg v. Donaldson, 2 Met. (Ky.) 445; Inman v. Strattan, 4 Bush, 445; Kennedy v. Morrison, 31 Tex. 207, 221. In New York the right to move to set aside the attachment in all cases is expressly saved by the statute. As the attachment had already been discharged, the plaintiff gained nothing by the motion, for, unless the motion was legally authorized, the order made thereon would not have the effect to restore any legal rights previously waived. The attachment proceedings were therefore terminated by the voluntary act of the defendant therein in executing the statutory bond and procuring the order for the discharge of the attachment. The plaintiffs in that action had no opportunity to oppose or be heard on the question of the validity of the attachment before it was discharged. The propriety of issuing it was not legally tried. For aught that appears this plaintiff could have had it tried in the same proceeding by making the ordinary motion, and so have caused such proceeding to be determined. It was held in Pixley v. Reed, 26 Minn. 80, (1 N. W. Rep. 800,) that the propriety of issuing the writ should ordinarily be thus tried before an action can be brought for procuring its issue. Rossiter v. Minn., etc., Paper Co., 37 Minn. 296, (33 N. W. Rep. 855;) Cooley, Torts, § 188; *198Marbourg v. Smith, 11 Kan. 554. The cases first cited proceed upon the theory that the effect of the execution of the bond and procuring the discharge by the defendant in the attachment proceeding is a waiver of any objection to the validity of the prior proceedings in issuing it. At all events the validity of the attachment was not tested in that proceeding, and no reason appears why it could not have been done. The case falls within the rule of Pixley v. Reed, and the order denying a new trial is affirmed.