Any person desiring to become a candidate in any regular election shall file written notice of his candidacy with the municipal superintendent not less than fifteen (15) nor more that [than] forty-five (45) days, as prescribed by ordinance, prior to the date fixed for the holding of any such election. Any person desiring to become a candidate in any special election shall file written notice of his candidacy with the municipal superintendent not less than ten (10) days nor more than thirty (30) days, as prescribed by ordinance, prior to the date fixed for the holding of any such election.