Except as otherwise provided in Section 9889.21, any person who fails to comply in any respect with the provisions of this chapter is guilty of a misdemeanor and punishable by a fine not exceeding one thousand dollars ($1,000), or by imprisonment not exceeding six months, or by both that fine and imprisonment.