The provisions of this chapter regarding a referendum shall be liberally construed to effect the objects of this chapter, and no irregularity or informality shall invalidate the election when it appears that the provisions of law have been substantially complied with.