The main question is whether the plaintiff ought to have been permitted to show that the justice, Jones, was acting without having given.the security required by law when he rendered the former judgment. By the law then in force every justice of the peace, before entering upon the duties of his office, was required to execute an instrument in writing with two sureties, to be approved by the supervisor of the town or ward in which he resided, conditioned that he would pay over on demand all moneys received by him in virtue of his office, to the person or persons entitled to the same, and to file such instrument in the office of the clerk of the city or town in which he should reside. (Stat. 1845, p. 190, § 34.) Sufficient facts appeared to show that Jones was a justice of the peace defacto, at the time he rendered the judgment in question. He came into his office by color of title. It is a well settled principle that acts done by such an officer are as valid, so far as the public or the rights of third persons are concerned, as though he had been an officer de jure, and that the title of the officer cannot be collaterally inquired into. It can be questioned only by a direct proceeding against the officer, by information in the nature of a quo warranto. (2 R. S. 581, § 28; The People v. Collins, 7 John. 549; The People v. Stevens, 5 Hill, 616; Green v. Burke, 23 Wend. 490; Riddle v. The County of Bedford, 7 Serg. & Rawle, 386.)
The same answer may be given to the suggestion that the justice improperly excluded evidence that Jones had not taken the official oath. It does not appear that the court passed upon the question which was raised upon that point, but if it had excluded the inquiry, I think the ruling would have been correct. While acting under color of an election, the acts of the justice would be valid as to the public and third parties, although he had omitted to take the oath of office.
It is objected that the justice erred in rendering a judgment in favor of the defendant for the amount of bis judgment against the plaintiff. The defendant, under his plea, gave notice that he should rely on the judgment as a bar against any demand which the plaintiff might prove against him ex-*171is ting prior to the commencement of his suit before Jones, which might have been set off in that suit; and also as a set-off against any demand which the plaintiff might establish against him in the suit then pending. The defendant gave evidence of his judgment after the plaintiff had made proof of his demand. It turned out on the trial that the plaintiff’s demand arose some five years before the suit was commenced before Jones, and was of that description which required the plaintiff in the last suit to have set it off in the former suit, and was therefore barred on this proof. The plaintiff might have submitted to a nonsuit; but the parties elected to submit the matter to the justice, whose duty it became to render judgment according to their respective rights. It is not necessary, to entitle a defendant to a judgment for the amount of a cross demand, which is the subject of a set-off and proved on the trial, that there should be something proved and allowed to the plaintiff. I think the recovery before the justice was well founded, and that the judgment of the common pleas should be reversed.
Judgment reversed.