In either of the following circumstances a violation of any provision of this code does not establish negligence as a matter of law, but in any civil action under either of the circumstances negligence must be proved as a fact without regard to the violation. The circumstances under which this section applies are either:
(a) Where violation of the provision was required by a law of the federal government or by any rule, regulation, directive or order of any agency of the federal government, the violation of which is subject to penalty under an act of Congress or by any valid order of military authority.
(b) Where violation of the provision was required in order to comply with any regulation, directive, or order of the Governor promulgated under the California Emergency Services Act.
(Amended by Stats. 1971, Ch. 438.)