Every person who violates any of the provisions of this chapter or of Chapter 4 (commencing with Section 4100) is guilty of a misdemeanor and is punishable by a fine of not less than fifty dollars ($50) nor more than five hundred dollars ($500), or by imprisonment in the county jail for not less than 10 days nor more than six months, or by both such fine and imprisonment.