In all actions hereafter brought against any such person or corporation so operating such railroad, under and by virtue of any of the provisions of this act, the fact that the employee may have been guilty of contributory negligence shall not bar a recovery, but the damages shall be diminished by the jury in proportion to the amount of negligence attributable to such employee; provided, that no such employee who may be injured or killed shall be held to have been guilty of contributory negligence in any case where the violation by such person or corporation so operating such railroad, of any statute enacted for the safety of employees contributed to the injury or death of such employee.
W.S. 37-9-502