That the bond declared on does not conform to the requisitions of Rev. Sts. c. 36, § 27, is too clear to admit of debate. It cannot be regarded in any just sense as a bond with two sureties. Each of the persons who have executed it as surety is bound severally in the specific sum of two thousand dollars only, so that in effect there is but one surety for the whole penalty. The plaintiffs do not claim that the instrument comes within the provisions of the statute. The real question at issue is, whether the bond is invalid, so that no action can be maintained upon it, because the plaintiffs have omitted to comply with the statute in not taking a bond with two sureties for the whole penal sum.
The rule of law is well settled, that a bond given for the faithful performance of official duties, or in pursuance of some requirement of law, may be valid and binding on the parties, although not made with the formalities or executed in the mode provided by the statute under which it purports to have been given. This rule rests on the principle that, although the instrument may not conform to the special provisions of a statute or regulation in compliance with which the parties executed it, nevertheless it is a contract voluntarily entered into upon a sufficient consideration, for a purpose not contrary to law, and therefore it is obligatory on the parties to it in like manner as any other contract or agreement is held valid at common law. Morse v. Hodsdon, 5 Mass. 314. Burroughs v. Lowder, 8 Mass. 373. Sweetser v. Hay, 2 Gray, 49.
The defendant, however, contends that the bond in question does not come within this well established rule, because the plaintiffs in order to recover in an action for its breach must show that in accepting the bond they have acted in contravention *416of the express provision of the statute, which requires that a cashier, “ before he enters on the duties of his office, shall give a bond or bonds, with two or more sureties, to the satisfaction of the directors;” and that for this reason the case falls within that class of decisions in which it is held that a party, who in order to maintain his action is obliged to rely on an illegal transaction in which-he has participated, cannot have the aid of the law to enable him to recover. Assuming that the defendant is right in construing the statute as a prohibition on the directors, restraining them from permitting a person to act as cashier until he has given the requisite bond, it appears to us that the case does not fall within the principle on which the defendant relies. Is it true that the plaintiffs are obliged to bring in an illegal transaction and rely upon it, in order to aid them in making out their case ? This is said to be the test by which to determine whether a claim or cause of action is so connected with an illegal act or omission that it cannot be enforced in a court of law. Gregg v. Wyman, 4 Cush. 322, 327. Clearly the plaintiffs’ case does not come within this test. They prove no illegal act or omission in support of their case. They produce a bond duly executed, into which the parties voluntarily entered, and which is prima facie valid. Nor can it be truly said that in taking this bond they were guilty of a violation of law. Their fault, if any, consists in an omission or neglect to require of the cashier another bond, which conformed to the provisions of the statute. But this neglect or omission does not necessarily vitiate or render illegal the bond which was taken. The statute does not prohibit such a contract, or declare any bond void which is variant from that prescribed by its provisions. The illegality, then, is not in the bond declared on, but in the failure to take another bond with additional sureties, before the cashier entered on the duties of his office. There can be no doubt that if the statute bond had been given, they might also have taken an additional bond like the one in controversy. How then can it be said that the plaintiffs in proving their case rely on an unlawful transaction ? It is the proof of a new, distinct and independent fact, not appearing in the evidence necessary to support *417the plaintiffs’ case, but which is adduced by the defendant in answer to‘the case made by the plaintiffs, which is relied on to defeat the action. In this respect, the case at bar is unlike those cited by the counsel for the defendant. In all of them, either the cause of action was founded on a transaction in itself illegal, or it was necessary to the support of the plaintiffs’ case to show that he had participated in a violation of law. It seems to us, therefore, that the principle on which those cases rest is not applicable to the case at bar. Welch v. Wesson, 6 Gray, 505, It is not to be overlooked in this connection that nothing is shown in the facts before us to lead to the inference that the bond declared on was either given or taken with any intent to violate the provisions of the statute, or that the parties acted in the transaction otherwise than in perfect good faith.
But another and more decisive answer to the objection urged against the maintenance of this action is, that the plaintiffs have violated no absolute prohibition of the statute, and participated in no illegal act or transaction which defeats their right to enforce the bond. The fallacy of the defendant’s argument consists in the assumption that the statute is prohibitory, and was designed as a positive enactment that no person should be permitted by the directors to enter on the duties of the office of cashier of a bank until he had given the required bond. But such is not its true interpretation. No doubt a statute may enact an imperative prohibition, without annexing a penalty for a violation of its provisions. But there is a marked distinction between statutes of this class, "and those which are merely directory. The former are intended to forbid or restrain acts which are contrary to good morals or public policy, or tend to disturb the peace and good order of the community, and embrace that large class of cases which are usually designated as mala prohibita. The latter are enactments usually designed for the government and guidance of those to whom the charge and direction of matters of a public or private nature are committed, such as officers of corporations either municipal or aggregate, the main purpose of such statutes being to secure a safe, orderly and discreet management of business, and to prevent the *418damages which might arise both to the public and individuals from a want of due regulations in the conduct of such affairs. It is within the latter class that the enactment in question falls. The provision was intended only to prescribe a rule of duty to directors of banks, not to impose a restraint or prohibition on them. The clause that a cashier “ before he enters on the duties of his office, shall give ” the requisite bond, was designed to fix the time when the directors in the discharge of their duty should require such security, but not to render the appointment unlawful, or to prohibit the cashier from the performance of any official duty until the statute was complied with. This conclusion results from the subject matter to which the enactment relates. It cannot be reasonably supposed that the legislature intended that all the acts and doings of a cashier should be unlawful and void, to the injury it might be of innocent parties, in case of an irregularity or informality in his official bond, arising from inadvertence or mistake. And yet such would be the result of the argument urged in support of the defence, if carried to its legitimate and logical conclusion. We cannot sanction an interpretation of the statute attended with such consequences; more especially when we take into consideration the fact that the same or equivalent enactments exist in regard to clerks of courts, treasurers of counties and other officers of a public or quasi public character.
We cannot give much weight to the argument of the learned counsel of the defendant, that if the statute is held to be directory only, and not imperative, a wide door may be opened by which serious loss may result to individuals and the public by the failure of directors to require bonds of cashiers in accordance with its provisions. The difficulty with the argument is, that it proceeds on the theory that officers will- habitually and intentionally violate a plain requirement, which, although not in its nature prohibitory or restrictive, is nevertheless imposed on them as a part of their official duty. Certainly we cannot interpret a statute on any such assumption. If its provisions are disregarded, the law will furnish ample means by which to enforce them, without rendering it necessary to adopt a construction *419which might lead to consequences quite as mischievous as those which would flow from violations of the statute.
Exceptions overruled.