§ 3. Prohibited employment. Whenever the provisions of this chapter prohibit the employment of a person in certain work or under certain conditions the employer shall not permit such person to so work, with or without compensation, and in a prosecution or action therefor lack of consent by the employer shall be no defense.