Upon the hearing of such special proceedings, the court shall have power and jurisdiction to examine and determine the legality and validity of, and approve and confirm or disapprove and disaffirm, each and all of the proceedings for the organization of such district under sections 46-101 to 46-128, from and including the petition for the organization of the district, and all other proceedings which may affect the legality or validity of the bonds and the order of the sale and the sale thereof. The court in inquiring into the regularity, legality, or correctness of such proceedings shall disregard an error, irregularity, or omission which does not affect the substantial rights of the parties to such special proceedings, and it may approve and confirm such proceedings in part and disapprove and declare illegal or invalid other and subsequent parts of the proceedings. The court shall find and determine whether the notice of the filing of the petition has been duly given and published for the time and in the manner prescribed in section 46-1,104. The costs of the special proceedings may be allowed and apportioned between the parties in the discretion of the court. If the court shall determine the proceedings for the organization of the district legal and valid and the proceedings for the voting and issuing of the bonds legal and valid, the board of directors shall then prepare a written statement beginning with the filing of the petition for the organization of the district, and including all subsequent proceedings for the organization of the district and voting and issuing of the bonds, and ending with the decree of the court finding the proceedings for the organization of the district and the proceedings for the voting and issuing of the bonds legal and valid. The written statement shall be certified under oath by the board of directors of the district.