A violation of any ordinance, rule, or regulation enacted by the board relating to the nonpayment of a fare in any transit facility owned or controlled by the district shall be an infraction punishable by a fine not exceeding seventy-five dollars ($75), except that a violation by a person, after the second conviction under this section, shall be a misdemeanor punishable by a fine not exceeding five hundred dollars ($500) or by imprisonment in a county jail not exceeding six months, or by both that fine and imprisonment.