Before such ordinance shall be passed, the same shall be published for at least three weeks in at least one daily newspaper published in such city, to be designated by the lawmaking authorities of such city, but the failure to make such publication shall in no way affect the validity of such ordinance.