A peace officer may not take personal property into custody until the plaintiff delivers to the peace officer the affidavit and undertaking of sufficient sureties to the effect that they are bound in double the value of the property for the prosecution of the action and the return of the property to the defendant, if return be adjudged, and for the payment to the defendant of any sum that may be recovered against the plaintiff.