All official bonds hereafter given by any clerk of either branch of the legislature, or by any county treasurer, or by any brigade inspector, or by any officer on the public works, shall not be deemed invalid, on the ground that the same shall not have been approved by the proper officer or officers, as directed by law; but the same are hereby declared to be as good and valid in law against said public officers and their sureties as if said bonds had been executed and approved in due form of law; and no mistake in the bond of any collector or other public officer, as to the name of the officer described, in the instrument intended for his official bond, shall in anywise invalidate such bond, but the same shall be considered to apply to the officer whose office was intended to be described in such bond.
8 P.S. § 91