It is a sufficient defense to any suit or prosecution under an ordinance, to show that no publication or posting was made as required by sections 731.21 to 731.25, inclusive, of the Revised Code.