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 $50 nor more than $300, or imprisoned in the county jail not less than ten nor more than one hundred days, or both fined and imprisoned.