Although the legality of a bond is usually tested by a plea, yet if the bond upon its face is shown to have been executed upon an illegal consideration, and the bond is fully set out in the declaration, a demurrer to the declaration, founded on it, is a proper mode of testing its validity. See 6 Ala. Rep. 128. Hence, if the bond as declared on is illegal, the judgment sustaining the demurrer is not erroneous.
A bond executed to a sheriff, to induce him to do an unlawful act, is void. See Prewitt v. Garrett, 6 Ala. Rep. 128; 2 J. J. Marsh. 181; 4 Cowen, 340 ; 8 Ala. Rep. 476. So a bond given to a sheriff as an indemnity, to induce him to perform a duty required of him by law, is said to be void. 5 Monr. R. 529. The question then, is, does it appear from the condition of this bond, that it was executed and delivered to the plaintiff, as a constable, to induce him to do-an unlawful act ? By the act of 1833, one work horse, or mule, or a pair of oxen, &c. shall be retained,.by and for the use of every family in this State, free and exempt from levy and sale by virtue of any execution, or other legal process. Clay’s Dig. 210. The condition of the bond, shows that the constable had levied on a mare, as the property of Gear, and that he had claimed that the mare was exempt from execution by *26law, and that the constable had declined to sell her; and the bond was given to him in the language of the condition,- to indemnify him against all damages and cost, for any of his acts as constable. The declaration shows that it was given to induce him to sell the mare, and that relying on the. bond as an indemnity, he did sell her. It was then, given to induce a constable to do an unlawful act, in the execution of process in his hands, and is void, unless by statute law the constable may take such a bond.
By the act of 1807, (Clay’s Dig. 210,) it is enacted, that if any sheriff shall levy an execution on property, and doubts shall arise, whether the right to the property is in the debtor, the sheriff may apply to the plaintiff for a bond of indemnity, for the sale of the property seized; which if the plaintiff neglects to give, for ten days after such application, the sheriff or other officer may deliver up the property to the possession of the party from whom it was taken. This statute does not reach this case. Here there was no doubt about the title of the property; the title was in the debtor, but by law it was exempt from sale. It was a violation of duty to levy on the mare, and the bond taken was to induce the constable to sell her; it was then plainly given to induce him to violate the law, and is therefore void.
In Prewitt v. Garrett, 6 Ala. Rep. 128, the defendant in the execution gave a bond of indemnity, to induce the sheriff to sell the property of a stranger, this court held the bond void. The statute before referred to, did not authorize the taking of such a bond, and it was void at common law. As there is no statute that authorizes the taking or giving of such a bond as this, and as it is given to induce an officer to violate the statute, in selling property not subject to levy and sale, it was given on an illegal consideration, and is therefore void.
The court did not err in sustaining the demurrer, and the judgment is affirmed.