The petitioner shall file in the proper court within ten days after filing of the petition a bond with security to be approved by the clerk of the court conditioned to pay all costs in case the election is confirmed.