Any person who exceeds the creel limit on trout or who otherwise violates any provisions of this code or any rules and regulations relating to trout fishing is guilty of a misdemeanor, and, upon conviction thereof, shall be fined not less than fifty dollars nor more than three hundred dollars, or imprisoned in the county jail not less than ten nor more than one hundred days, or both fined and imprisoned.